import require$$1 from 'http';
import require$$2 from 'https';
import require$$0 from 'url';
import require$$3 from 'stream';
import require$$4 from 'assert';
import require$$8 from 'zlib';

var axios$2 = {exports: {}};

var bind$2 = function bind(fn, thisArg) {
  return function wrap() {
    var args = new Array(arguments.length);
    for (var i = 0; i < args.length; i++) {
      args[i] = arguments[i];
    }
    return fn.apply(thisArg, args);
  };
};

var bind$1 = bind$2;

// utils is a library of generic helper functions non-specific to axios

var toString = Object.prototype.toString;

/**
 * Determine if a value is an Array
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Array, otherwise false
 */
function isArray(val) {
  return Array.isArray(val);
}

/**
 * Determine if a value is undefined
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if the value is undefined, otherwise false
 */
function isUndefined(val) {
  return typeof val === 'undefined';
}

/**
 * Determine if a value is a Buffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Buffer, otherwise false
 */
function isBuffer(val) {
  return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)
    && typeof val.constructor.isBuffer === 'function' && val.constructor.isBuffer(val);
}

/**
 * Determine if a value is an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an ArrayBuffer, otherwise false
 */
function isArrayBuffer(val) {
  return toString.call(val) === '[object ArrayBuffer]';
}

/**
 * Determine if a value is a FormData
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an FormData, otherwise false
 */
function isFormData(val) {
  return toString.call(val) === '[object FormData]';
}

/**
 * Determine if a value is a view on an ArrayBuffer
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
 */
function isArrayBufferView(val) {
  var result;
  if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {
    result = ArrayBuffer.isView(val);
  } else {
    result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));
  }
  return result;
}

/**
 * Determine if a value is a String
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a String, otherwise false
 */
function isString(val) {
  return typeof val === 'string';
}

/**
 * Determine if a value is a Number
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Number, otherwise false
 */
function isNumber(val) {
  return typeof val === 'number';
}

/**
 * Determine if a value is an Object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is an Object, otherwise false
 */
function isObject(val) {
  return val !== null && typeof val === 'object';
}

/**
 * Determine if a value is a plain Object
 *
 * @param {Object} val The value to test
 * @return {boolean} True if value is a plain Object, otherwise false
 */
function isPlainObject(val) {
  if (toString.call(val) !== '[object Object]') {
    return false;
  }

  var prototype = Object.getPrototypeOf(val);
  return prototype === null || prototype === Object.prototype;
}

/**
 * Determine if a value is a Date
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Date, otherwise false
 */
function isDate(val) {
  return toString.call(val) === '[object Date]';
}

/**
 * Determine if a value is a File
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a File, otherwise false
 */
function isFile(val) {
  return toString.call(val) === '[object File]';
}

/**
 * Determine if a value is a Blob
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Blob, otherwise false
 */
function isBlob(val) {
  return toString.call(val) === '[object Blob]';
}

/**
 * Determine if a value is a Function
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Function, otherwise false
 */
function isFunction(val) {
  return toString.call(val) === '[object Function]';
}

/**
 * Determine if a value is a Stream
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a Stream, otherwise false
 */
function isStream(val) {
  return isObject(val) && isFunction(val.pipe);
}

/**
 * Determine if a value is a URLSearchParams object
 *
 * @param {Object} val The value to test
 * @returns {boolean} True if value is a URLSearchParams object, otherwise false
 */
function isURLSearchParams(val) {
  return toString.call(val) === '[object URLSearchParams]';
}

/**
 * Trim excess whitespace off the beginning and end of a string
 *
 * @param {String} str The String to trim
 * @returns {String} The String freed of excess whitespace
 */
function trim(str) {
  return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
}

/**
 * Determine if we're running in a standard browser environment
 *
 * This allows axios to run in a web worker, and react-native.
 * Both environments support XMLHttpRequest, but not fully standard globals.
 *
 * web workers:
 *  typeof window -> undefined
 *  typeof document -> undefined
 *
 * react-native:
 *  navigator.product -> 'ReactNative'
 * nativescript
 *  navigator.product -> 'NativeScript' or 'NS'
 */
function isStandardBrowserEnv() {
  if (typeof navigator !== 'undefined' && (navigator.product === 'ReactNative' ||
                                           navigator.product === 'NativeScript' ||
                                           navigator.product === 'NS')) {
    return false;
  }
  return (
    typeof window !== 'undefined' &&
    typeof document !== 'undefined'
  );
}

/**
 * Iterate over an Array or an Object invoking a function for each item.
 *
 * If `obj` is an Array callback will be called passing
 * the value, index, and complete array for each item.
 *
 * If 'obj' is an Object callback will be called passing
 * the value, key, and complete object for each property.
 *
 * @param {Object|Array} obj The object to iterate
 * @param {Function} fn The callback to invoke for each item
 */
function forEach(obj, fn) {
  // Don't bother if no value provided
  if (obj === null || typeof obj === 'undefined') {
    return;
  }

  // Force an array if not already something iterable
  if (typeof obj !== 'object') {
    /*eslint no-param-reassign:0*/
    obj = [obj];
  }

  if (isArray(obj)) {
    // Iterate over array values
    for (var i = 0, l = obj.length; i < l; i++) {
      fn.call(null, obj[i], i, obj);
    }
  } else {
    // Iterate over object keys
    for (var key in obj) {
      if (Object.prototype.hasOwnProperty.call(obj, key)) {
        fn.call(null, obj[key], key, obj);
      }
    }
  }
}

/**
 * Accepts varargs expecting each argument to be an object, then
 * immutably merges the properties of each object and returns result.
 *
 * When multiple objects contain the same key the later object in
 * the arguments list will take precedence.
 *
 * Example:
 *
 * ```js
 * var result = merge({foo: 123}, {foo: 456});
 * console.log(result.foo); // outputs 456
 * ```
 *
 * @param {Object} obj1 Object to merge
 * @returns {Object} Result of all merge properties
 */
function merge(/* obj1, obj2, obj3, ... */) {
  var result = {};
  function assignValue(val, key) {
    if (isPlainObject(result[key]) && isPlainObject(val)) {
      result[key] = merge(result[key], val);
    } else if (isPlainObject(val)) {
      result[key] = merge({}, val);
    } else if (isArray(val)) {
      result[key] = val.slice();
    } else {
      result[key] = val;
    }
  }

  for (var i = 0, l = arguments.length; i < l; i++) {
    forEach(arguments[i], assignValue);
  }
  return result;
}

/**
 * Extends object a by mutably adding to it the properties of object b.
 *
 * @param {Object} a The object to be extended
 * @param {Object} b The object to copy properties from
 * @param {Object} thisArg The object to bind function to
 * @return {Object} The resulting value of object a
 */
function extend(a, b, thisArg) {
  forEach(b, function assignValue(val, key) {
    if (thisArg && typeof val === 'function') {
      a[key] = bind$1(val, thisArg);
    } else {
      a[key] = val;
    }
  });
  return a;
}

/**
 * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)
 *
 * @param {string} content with BOM
 * @return {string} content value without BOM
 */
function stripBOM(content) {
  if (content.charCodeAt(0) === 0xFEFF) {
    content = content.slice(1);
  }
  return content;
}

var utils$f = {
  isArray: isArray,
  isArrayBuffer: isArrayBuffer,
  isBuffer: isBuffer,
  isFormData: isFormData,
  isArrayBufferView: isArrayBufferView,
  isString: isString,
  isNumber: isNumber,
  isObject: isObject,
  isPlainObject: isPlainObject,
  isUndefined: isUndefined,
  isDate: isDate,
  isFile: isFile,
  isBlob: isBlob,
  isFunction: isFunction,
  isStream: isStream,
  isURLSearchParams: isURLSearchParams,
  isStandardBrowserEnv: isStandardBrowserEnv,
  forEach: forEach,
  merge: merge,
  extend: extend,
  trim: trim,
  stripBOM: stripBOM
};

var utils$e = utils$f;

function encode(val) {
  return encodeURIComponent(val).
    replace(/%3A/gi, ':').
    replace(/%24/g, '$').
    replace(/%2C/gi, ',').
    replace(/%20/g, '+').
    replace(/%5B/gi, '[').
    replace(/%5D/gi, ']');
}

/**
 * Build a URL by appending params to the end
 *
 * @param {string} url The base of the url (e.g., http://www.google.com)
 * @param {object} [params] The params to be appended
 * @returns {string} The formatted url
 */
var buildURL$3 = function buildURL(url, params, paramsSerializer) {
  /*eslint no-param-reassign:0*/
  if (!params) {
    return url;
  }

  var serializedParams;
  if (paramsSerializer) {
    serializedParams = paramsSerializer(params);
  } else if (utils$e.isURLSearchParams(params)) {
    serializedParams = params.toString();
  } else {
    var parts = [];

    utils$e.forEach(params, function serialize(val, key) {
      if (val === null || typeof val === 'undefined') {
        return;
      }

      if (utils$e.isArray(val)) {
        key = key + '[]';
      } else {
        val = [val];
      }

      utils$e.forEach(val, function parseValue(v) {
        if (utils$e.isDate(v)) {
          v = v.toISOString();
        } else if (utils$e.isObject(v)) {
          v = JSON.stringify(v);
        }
        parts.push(encode(key) + '=' + encode(v));
      });
    });

    serializedParams = parts.join('&');
  }

  if (serializedParams) {
    var hashmarkIndex = url.indexOf('#');
    if (hashmarkIndex !== -1) {
      url = url.slice(0, hashmarkIndex);
    }

    url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;
  }

  return url;
};

var utils$d = utils$f;

function InterceptorManager$1() {
  this.handlers = [];
}

/**
 * Add a new interceptor to the stack
 *
 * @param {Function} fulfilled The function to handle `then` for a `Promise`
 * @param {Function} rejected The function to handle `reject` for a `Promise`
 *
 * @return {Number} An ID used to remove interceptor later
 */
InterceptorManager$1.prototype.use = function use(fulfilled, rejected, options) {
  this.handlers.push({
    fulfilled: fulfilled,
    rejected: rejected,
    synchronous: options ? options.synchronous : false,
    runWhen: options ? options.runWhen : null
  });
  return this.handlers.length - 1;
};

/**
 * Remove an interceptor from the stack
 *
 * @param {Number} id The ID that was returned by `use`
 */
InterceptorManager$1.prototype.eject = function eject(id) {
  if (this.handlers[id]) {
    this.handlers[id] = null;
  }
};

/**
 * Iterate over all the registered interceptors
 *
 * This method is particularly useful for skipping over any
 * interceptors that may have become `null` calling `eject`.
 *
 * @param {Function} fn The function to call for each interceptor
 */
InterceptorManager$1.prototype.forEach = function forEach(fn) {
  utils$d.forEach(this.handlers, function forEachHandler(h) {
    if (h !== null) {
      fn(h);
    }
  });
};

var InterceptorManager_1 = InterceptorManager$1;

var utils$c = utils$f;

var normalizeHeaderName$1 = function normalizeHeaderName(headers, normalizedName) {
  utils$c.forEach(headers, function processHeader(value, name) {
    if (name !== normalizedName && name.toUpperCase() === normalizedName.toUpperCase()) {
      headers[normalizedName] = value;
      delete headers[name];
    }
  });
};

/**
 * Update an Error with the specified config, error code, and response.
 *
 * @param {Error} error The error to update.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The error.
 */
var enhanceError$3 = function enhanceError(error, config, code, request, response) {
  error.config = config;
  if (code) {
    error.code = code;
  }

  error.request = request;
  error.response = response;
  error.isAxiosError = true;

  error.toJSON = function toJSON() {
    return {
      // Standard
      message: this.message,
      name: this.name,
      // Microsoft
      description: this.description,
      number: this.number,
      // Mozilla
      fileName: this.fileName,
      lineNumber: this.lineNumber,
      columnNumber: this.columnNumber,
      stack: this.stack,
      // Axios
      config: this.config,
      code: this.code,
      status: this.response && this.response.status ? this.response.status : null
    };
  };
  return error;
};

var transitional = {
  silentJSONParsing: true,
  forcedJSONParsing: true,
  clarifyTimeoutError: false
};

var enhanceError$2 = enhanceError$3;

/**
 * Create an Error with the specified message, config, error code, request and response.
 *
 * @param {string} message The error message.
 * @param {Object} config The config.
 * @param {string} [code] The error code (for example, 'ECONNABORTED').
 * @param {Object} [request] The request.
 * @param {Object} [response] The response.
 * @returns {Error} The created error.
 */
var createError$3 = function createError(message, config, code, request, response) {
  var error = new Error(message);
  return enhanceError$2(error, config, code, request, response);
};

var createError$2 = createError$3;

/**
 * Resolve or reject a Promise based on response status.
 *
 * @param {Function} resolve A function that resolves the promise.
 * @param {Function} reject A function that rejects the promise.
 * @param {object} response The response.
 */
var settle$2 = function settle(resolve, reject, response) {
  var validateStatus = response.config.validateStatus;
  if (!response.status || !validateStatus || validateStatus(response.status)) {
    resolve(response);
  } else {
    reject(createError$2(
      'Request failed with status code ' + response.status,
      response.config,
      null,
      response.request,
      response
    ));
  }
};

var utils$b = utils$f;

var cookies$1 = (
  utils$b.isStandardBrowserEnv() ?

  // Standard browser envs support document.cookie
    (function standardBrowserEnv() {
      return {
        write: function write(name, value, expires, path, domain, secure) {
          var cookie = [];
          cookie.push(name + '=' + encodeURIComponent(value));

          if (utils$b.isNumber(expires)) {
            cookie.push('expires=' + new Date(expires).toGMTString());
          }

          if (utils$b.isString(path)) {
            cookie.push('path=' + path);
          }

          if (utils$b.isString(domain)) {
            cookie.push('domain=' + domain);
          }

          if (secure === true) {
            cookie.push('secure');
          }

          document.cookie = cookie.join('; ');
        },

        read: function read(name) {
          var match = document.cookie.match(new RegExp('(^|;\\s*)(' + name + ')=([^;]*)'));
          return (match ? decodeURIComponent(match[3]) : null);
        },

        remove: function remove(name) {
          this.write(name, '', Date.now() - 86400000);
        }
      };
    })() :

  // Non standard browser env (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return {
        write: function write() {},
        read: function read() { return null; },
        remove: function remove() {}
      };
    })()
);

/**
 * Determines whether the specified URL is absolute
 *
 * @param {string} url The URL to test
 * @returns {boolean} True if the specified URL is absolute, otherwise false
 */
var isAbsoluteURL$1 = function isAbsoluteURL(url) {
  // A URL is considered absolute if it begins with "<scheme>://" or "//" (protocol-relative URL).
  // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed
  // by any combination of letters, digits, plus, period, or hyphen.
  return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(url);
};

/**
 * Creates a new URL by combining the specified URLs
 *
 * @param {string} baseURL The base URL
 * @param {string} relativeURL The relative URL
 * @returns {string} The combined URL
 */
var combineURLs$1 = function combineURLs(baseURL, relativeURL) {
  return relativeURL
    ? baseURL.replace(/\/+$/, '') + '/' + relativeURL.replace(/^\/+/, '')
    : baseURL;
};

var isAbsoluteURL = isAbsoluteURL$1;
var combineURLs = combineURLs$1;

/**
 * Creates a new URL by combining the baseURL with the requestedURL,
 * only when the requestedURL is not already an absolute URL.
 * If the requestURL is absolute, this function returns the requestedURL untouched.
 *
 * @param {string} baseURL The base URL
 * @param {string} requestedURL Absolute or relative URL to combine
 * @returns {string} The combined full path
 */
var buildFullPath$2 = function buildFullPath(baseURL, requestedURL) {
  if (baseURL && !isAbsoluteURL(requestedURL)) {
    return combineURLs(baseURL, requestedURL);
  }
  return requestedURL;
};

var utils$a = utils$f;

// Headers whose duplicates are ignored by node
// c.f. https://nodejs.org/api/http.html#http_message_headers
var ignoreDuplicateOf = [
  'age', 'authorization', 'content-length', 'content-type', 'etag',
  'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',
  'last-modified', 'location', 'max-forwards', 'proxy-authorization',
  'referer', 'retry-after', 'user-agent'
];

/**
 * Parse headers into an object
 *
 * ```
 * Date: Wed, 27 Aug 2014 08:58:49 GMT
 * Content-Type: application/json
 * Connection: keep-alive
 * Transfer-Encoding: chunked
 * ```
 *
 * @param {String} headers Headers needing to be parsed
 * @returns {Object} Headers parsed into an object
 */
var parseHeaders$1 = function parseHeaders(headers) {
  var parsed = {};
  var key;
  var val;
  var i;

  if (!headers) { return parsed; }

  utils$a.forEach(headers.split('\n'), function parser(line) {
    i = line.indexOf(':');
    key = utils$a.trim(line.substr(0, i)).toLowerCase();
    val = utils$a.trim(line.substr(i + 1));

    if (key) {
      if (parsed[key] && ignoreDuplicateOf.indexOf(key) >= 0) {
        return;
      }
      if (key === 'set-cookie') {
        parsed[key] = (parsed[key] ? parsed[key] : []).concat([val]);
      } else {
        parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;
      }
    }
  });

  return parsed;
};

var utils$9 = utils$f;

var isURLSameOrigin$1 = (
  utils$9.isStandardBrowserEnv() ?

  // Standard browser envs have full support of the APIs needed to test
  // whether the request URL is of the same origin as current location.
    (function standardBrowserEnv() {
      var msie = /(msie|trident)/i.test(navigator.userAgent);
      var urlParsingNode = document.createElement('a');
      var originURL;

      /**
    * Parse a URL to discover it's components
    *
    * @param {String} url The URL to be parsed
    * @returns {Object}
    */
      function resolveURL(url) {
        var href = url;

        if (msie) {
        // IE needs attribute set twice to normalize properties
          urlParsingNode.setAttribute('href', href);
          href = urlParsingNode.href;
        }

        urlParsingNode.setAttribute('href', href);

        // urlParsingNode provides the UrlUtils interface - http://url.spec.whatwg.org/#urlutils
        return {
          href: urlParsingNode.href,
          protocol: urlParsingNode.protocol ? urlParsingNode.protocol.replace(/:$/, '') : '',
          host: urlParsingNode.host,
          search: urlParsingNode.search ? urlParsingNode.search.replace(/^\?/, '') : '',
          hash: urlParsingNode.hash ? urlParsingNode.hash.replace(/^#/, '') : '',
          hostname: urlParsingNode.hostname,
          port: urlParsingNode.port,
          pathname: (urlParsingNode.pathname.charAt(0) === '/') ?
            urlParsingNode.pathname :
            '/' + urlParsingNode.pathname
        };
      }

      originURL = resolveURL(window.location.href);

      /**
    * Determine if a URL shares the same origin as the current location
    *
    * @param {String} requestURL The URL to test
    * @returns {boolean} True if URL shares the same origin, otherwise false
    */
      return function isURLSameOrigin(requestURL) {
        var parsed = (utils$9.isString(requestURL)) ? resolveURL(requestURL) : requestURL;
        return (parsed.protocol === originURL.protocol &&
            parsed.host === originURL.host);
      };
    })() :

  // Non standard browser envs (web workers, react-native) lack needed support.
    (function nonStandardBrowserEnv() {
      return function isURLSameOrigin() {
        return true;
      };
    })()
);

/**
 * A `Cancel` is an object that is thrown when an operation is canceled.
 *
 * @class
 * @param {string=} message The message.
 */
function Cancel$4(message) {
  this.message = message;
}

Cancel$4.prototype.toString = function toString() {
  return 'Cancel' + (this.message ? ': ' + this.message : '');
};

Cancel$4.prototype.__CANCEL__ = true;

var Cancel_1 = Cancel$4;

var utils$8 = utils$f;
var settle$1 = settle$2;
var cookies = cookies$1;
var buildURL$2 = buildURL$3;
var buildFullPath$1 = buildFullPath$2;
var parseHeaders = parseHeaders$1;
var isURLSameOrigin = isURLSameOrigin$1;
var createError$1 = createError$3;
var transitionalDefaults$2 = transitional;
var Cancel$3 = Cancel_1;

var xhr = function xhrAdapter(config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    var requestData = config.data;
    var requestHeaders = config.headers;
    var responseType = config.responseType;
    var onCanceled;
    function done() {
      if (config.cancelToken) {
        config.cancelToken.unsubscribe(onCanceled);
      }

      if (config.signal) {
        config.signal.removeEventListener('abort', onCanceled);
      }
    }

    if (utils$8.isFormData(requestData)) {
      delete requestHeaders['Content-Type']; // Let the browser set it
    }

    var request = new XMLHttpRequest();

    // HTTP basic authentication
    if (config.auth) {
      var username = config.auth.username || '';
      var password = config.auth.password ? unescape(encodeURIComponent(config.auth.password)) : '';
      requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
    }

    var fullPath = buildFullPath$1(config.baseURL, config.url);
    request.open(config.method.toUpperCase(), buildURL$2(fullPath, config.params, config.paramsSerializer), true);

    // Set the request timeout in MS
    request.timeout = config.timeout;

    function onloadend() {
      if (!request) {
        return;
      }
      // Prepare the response
      var responseHeaders = 'getAllResponseHeaders' in request ? parseHeaders(request.getAllResponseHeaders()) : null;
      var responseData = !responseType || responseType === 'text' ||  responseType === 'json' ?
        request.responseText : request.response;
      var response = {
        data: responseData,
        status: request.status,
        statusText: request.statusText,
        headers: responseHeaders,
        config: config,
        request: request
      };

      settle$1(function _resolve(value) {
        resolve(value);
        done();
      }, function _reject(err) {
        reject(err);
        done();
      }, response);

      // Clean up request
      request = null;
    }

    if ('onloadend' in request) {
      // Use onloadend if available
      request.onloadend = onloadend;
    } else {
      // Listen for ready state to emulate onloadend
      request.onreadystatechange = function handleLoad() {
        if (!request || request.readyState !== 4) {
          return;
        }

        // The request errored out and we didn't get a response, this will be
        // handled by onerror instead
        // With one exception: request that using file: protocol, most browsers
        // will return status as 0 even though it's a successful request
        if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {
          return;
        }
        // readystate handler is calling before onerror or ontimeout handlers,
        // so we should call onloadend on the next 'tick'
        setTimeout(onloadend);
      };
    }

    // Handle browser request cancellation (as opposed to a manual cancellation)
    request.onabort = function handleAbort() {
      if (!request) {
        return;
      }

      reject(createError$1('Request aborted', config, 'ECONNABORTED', request));

      // Clean up request
      request = null;
    };

    // Handle low level network errors
    request.onerror = function handleError() {
      // Real errors are hidden from us by the browser
      // onerror should only fire if it's a network error
      reject(createError$1('Network Error', config, null, request));

      // Clean up request
      request = null;
    };

    // Handle timeout
    request.ontimeout = function handleTimeout() {
      var timeoutErrorMessage = config.timeout ? 'timeout of ' + config.timeout + 'ms exceeded' : 'timeout exceeded';
      var transitional = config.transitional || transitionalDefaults$2;
      if (config.timeoutErrorMessage) {
        timeoutErrorMessage = config.timeoutErrorMessage;
      }
      reject(createError$1(
        timeoutErrorMessage,
        config,
        transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
        request));

      // Clean up request
      request = null;
    };

    // Add xsrf header
    // This is only done if running in a standard browser environment.
    // Specifically not if we're in a web worker, or react-native.
    if (utils$8.isStandardBrowserEnv()) {
      // Add xsrf header
      var xsrfValue = (config.withCredentials || isURLSameOrigin(fullPath)) && config.xsrfCookieName ?
        cookies.read(config.xsrfCookieName) :
        undefined;

      if (xsrfValue) {
        requestHeaders[config.xsrfHeaderName] = xsrfValue;
      }
    }

    // Add headers to the request
    if ('setRequestHeader' in request) {
      utils$8.forEach(requestHeaders, function setRequestHeader(val, key) {
        if (typeof requestData === 'undefined' && key.toLowerCase() === 'content-type') {
          // Remove Content-Type if data is undefined
          delete requestHeaders[key];
        } else {
          // Otherwise add header to the request
          request.setRequestHeader(key, val);
        }
      });
    }

    // Add withCredentials to request if needed
    if (!utils$8.isUndefined(config.withCredentials)) {
      request.withCredentials = !!config.withCredentials;
    }

    // Add responseType to request if needed
    if (responseType && responseType !== 'json') {
      request.responseType = config.responseType;
    }

    // Handle progress if needed
    if (typeof config.onDownloadProgress === 'function') {
      request.addEventListener('progress', config.onDownloadProgress);
    }

    // Not all browsers support upload events
    if (typeof config.onUploadProgress === 'function' && request.upload) {
      request.upload.addEventListener('progress', config.onUploadProgress);
    }

    if (config.cancelToken || config.signal) {
      // Handle cancellation
      // eslint-disable-next-line func-names
      onCanceled = function(cancel) {
        if (!request) {
          return;
        }
        reject(!cancel || (cancel && cancel.type) ? new Cancel$3('canceled') : cancel);
        request.abort();
        request = null;
      };

      config.cancelToken && config.cancelToken.subscribe(onCanceled);
      if (config.signal) {
        config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
      }
    }

    if (!requestData) {
      requestData = null;
    }

    // Send the request
    request.send(requestData);
  });
};

var followRedirects = {exports: {}};

var debug$1;

var debug_1 = function () {
  if (!debug$1) {
    try {
      /* eslint global-require: off */
      debug$1 = require("debug")("follow-redirects");
    }
    catch (error) { /* */ }
    if (typeof debug$1 !== "function") {
      debug$1 = function () { /* */ };
    }
  }
  debug$1.apply(null, arguments);
};

var url$1 = require$$0;
var URL = url$1.URL;
var http$1 = require$$1;
var https$1 = require$$2;
var Writable = require$$3.Writable;
var assert = require$$4;
var debug = debug_1;

// Create handlers that pass events from native requests
var events = ["abort", "aborted", "connect", "error", "socket", "timeout"];
var eventHandlers = Object.create(null);
events.forEach(function (event) {
  eventHandlers[event] = function (arg1, arg2, arg3) {
    this._redirectable.emit(event, arg1, arg2, arg3);
  };
});

// Error types with codes
var RedirectionError = createErrorType(
  "ERR_FR_REDIRECTION_FAILURE",
  "Redirected request failed"
);
var TooManyRedirectsError = createErrorType(
  "ERR_FR_TOO_MANY_REDIRECTS",
  "Maximum number of redirects exceeded"
);
var MaxBodyLengthExceededError = createErrorType(
  "ERR_FR_MAX_BODY_LENGTH_EXCEEDED",
  "Request body larger than maxBodyLength limit"
);
var WriteAfterEndError = createErrorType(
  "ERR_STREAM_WRITE_AFTER_END",
  "write after end"
);

// An HTTP(S) request that can be redirected
function RedirectableRequest(options, responseCallback) {
  // Initialize the request
  Writable.call(this);
  this._sanitizeOptions(options);
  this._options = options;
  this._ended = false;
  this._ending = false;
  this._redirectCount = 0;
  this._redirects = [];
  this._requestBodyLength = 0;
  this._requestBodyBuffers = [];

  // Attach a callback if passed
  if (responseCallback) {
    this.on("response", responseCallback);
  }

  // React to responses of native requests
  var self = this;
  this._onNativeResponse = function (response) {
    self._processResponse(response);
  };

  // Perform the first request
  this._performRequest();
}
RedirectableRequest.prototype = Object.create(Writable.prototype);

RedirectableRequest.prototype.abort = function () {
  abortRequest(this._currentRequest);
  this.emit("abort");
};

// Writes buffered data to the current native request
RedirectableRequest.prototype.write = function (data, encoding, callback) {
  // Writing is not allowed if end has been called
  if (this._ending) {
    throw new WriteAfterEndError();
  }

  // Validate input and shift parameters if necessary
  if (!(typeof data === "string" || typeof data === "object" && ("length" in data))) {
    throw new TypeError("data should be a string, Buffer or Uint8Array");
  }
  if (typeof encoding === "function") {
    callback = encoding;
    encoding = null;
  }

  // Ignore empty buffers, since writing them doesn't invoke the callback
  // https://github.com/nodejs/node/issues/22066
  if (data.length === 0) {
    if (callback) {
      callback();
    }
    return;
  }
  // Only write when we don't exceed the maximum body length
  if (this._requestBodyLength + data.length <= this._options.maxBodyLength) {
    this._requestBodyLength += data.length;
    this._requestBodyBuffers.push({ data: data, encoding: encoding });
    this._currentRequest.write(data, encoding, callback);
  }
  // Error when we exceed the maximum body length
  else {
    this.emit("error", new MaxBodyLengthExceededError());
    this.abort();
  }
};

// Ends the current native request
RedirectableRequest.prototype.end = function (data, encoding, callback) {
  // Shift parameters if necessary
  if (typeof data === "function") {
    callback = data;
    data = encoding = null;
  }
  else if (typeof encoding === "function") {
    callback = encoding;
    encoding = null;
  }

  // Write data if needed and end
  if (!data) {
    this._ended = this._ending = true;
    this._currentRequest.end(null, null, callback);
  }
  else {
    var self = this;
    var currentRequest = this._currentRequest;
    this.write(data, encoding, function () {
      self._ended = true;
      currentRequest.end(null, null, callback);
    });
    this._ending = true;
  }
};

// Sets a header value on the current native request
RedirectableRequest.prototype.setHeader = function (name, value) {
  this._options.headers[name] = value;
  this._currentRequest.setHeader(name, value);
};

// Clears a header value on the current native request
RedirectableRequest.prototype.removeHeader = function (name) {
  delete this._options.headers[name];
  this._currentRequest.removeHeader(name);
};

// Global timeout for all underlying requests
RedirectableRequest.prototype.setTimeout = function (msecs, callback) {
  var self = this;

  // Destroys the socket on timeout
  function destroyOnTimeout(socket) {
    socket.setTimeout(msecs);
    socket.removeListener("timeout", socket.destroy);
    socket.addListener("timeout", socket.destroy);
  }

  // Sets up a timer to trigger a timeout event
  function startTimer(socket) {
    if (self._timeout) {
      clearTimeout(self._timeout);
    }
    self._timeout = setTimeout(function () {
      self.emit("timeout");
      clearTimer();
    }, msecs);
    destroyOnTimeout(socket);
  }

  // Stops a timeout from triggering
  function clearTimer() {
    // Clear the timeout
    if (self._timeout) {
      clearTimeout(self._timeout);
      self._timeout = null;
    }

    // Clean up all attached listeners
    self.removeListener("abort", clearTimer);
    self.removeListener("error", clearTimer);
    self.removeListener("response", clearTimer);
    if (callback) {
      self.removeListener("timeout", callback);
    }
    if (!self.socket) {
      self._currentRequest.removeListener("socket", startTimer);
    }
  }

  // Attach callback if passed
  if (callback) {
    this.on("timeout", callback);
  }

  // Start the timer if or when the socket is opened
  if (this.socket) {
    startTimer(this.socket);
  }
  else {
    this._currentRequest.once("socket", startTimer);
  }

  // Clean up on events
  this.on("socket", destroyOnTimeout);
  this.on("abort", clearTimer);
  this.on("error", clearTimer);
  this.on("response", clearTimer);

  return this;
};

// Proxy all other public ClientRequest methods
[
  "flushHeaders", "getHeader",
  "setNoDelay", "setSocketKeepAlive",
].forEach(function (method) {
  RedirectableRequest.prototype[method] = function (a, b) {
    return this._currentRequest[method](a, b);
  };
});

// Proxy all public ClientRequest properties
["aborted", "connection", "socket"].forEach(function (property) {
  Object.defineProperty(RedirectableRequest.prototype, property, {
    get: function () { return this._currentRequest[property]; },
  });
});

RedirectableRequest.prototype._sanitizeOptions = function (options) {
  // Ensure headers are always present
  if (!options.headers) {
    options.headers = {};
  }

  // Since http.request treats host as an alias of hostname,
  // but the url module interprets host as hostname plus port,
  // eliminate the host property to avoid confusion.
  if (options.host) {
    // Use hostname if set, because it has precedence
    if (!options.hostname) {
      options.hostname = options.host;
    }
    delete options.host;
  }

  // Complete the URL object when necessary
  if (!options.pathname && options.path) {
    var searchPos = options.path.indexOf("?");
    if (searchPos < 0) {
      options.pathname = options.path;
    }
    else {
      options.pathname = options.path.substring(0, searchPos);
      options.search = options.path.substring(searchPos);
    }
  }
};


// Executes the next native request (initial or redirect)
RedirectableRequest.prototype._performRequest = function () {
  // Load the native protocol
  var protocol = this._options.protocol;
  var nativeProtocol = this._options.nativeProtocols[protocol];
  if (!nativeProtocol) {
    this.emit("error", new TypeError("Unsupported protocol " + protocol));
    return;
  }

  // If specified, use the agent corresponding to the protocol
  // (HTTP and HTTPS use different types of agents)
  if (this._options.agents) {
    var scheme = protocol.slice(0, -1);
    this._options.agent = this._options.agents[scheme];
  }

  // Create the native request
  var request = this._currentRequest =
        nativeProtocol.request(this._options, this._onNativeResponse);
  this._currentUrl = url$1.format(this._options);

  // Set up event handlers
  request._redirectable = this;
  for (var e = 0; e < events.length; e++) {
    request.on(events[e], eventHandlers[events[e]]);
  }

  // End a redirected request
  // (The first request must be ended explicitly with RedirectableRequest#end)
  if (this._isRedirect) {
    // Write the request entity and end.
    var i = 0;
    var self = this;
    var buffers = this._requestBodyBuffers;
    (function writeNext(error) {
      // Only write if this request has not been redirected yet
      /* istanbul ignore else */
      if (request === self._currentRequest) {
        // Report any write errors
        /* istanbul ignore if */
        if (error) {
          self.emit("error", error);
        }
        // Write the next buffer if there are still left
        else if (i < buffers.length) {
          var buffer = buffers[i++];
          /* istanbul ignore else */
          if (!request.finished) {
            request.write(buffer.data, buffer.encoding, writeNext);
          }
        }
        // End the request if `end` has been called on us
        else if (self._ended) {
          request.end();
        }
      }
    }());
  }
};

// Processes a response from the current native request
RedirectableRequest.prototype._processResponse = function (response) {
  // Store the redirected response
  var statusCode = response.statusCode;
  if (this._options.trackRedirects) {
    this._redirects.push({
      url: this._currentUrl,
      headers: response.headers,
      statusCode: statusCode,
    });
  }

  // RFC7231§6.4: The 3xx (Redirection) class of status code indicates
  // that further action needs to be taken by the user agent in order to
  // fulfill the request. If a Location header field is provided,
  // the user agent MAY automatically redirect its request to the URI
  // referenced by the Location field value,
  // even if the specific status code is not understood.

  // If the response is not a redirect; return it as-is
  var location = response.headers.location;
  if (!location || this._options.followRedirects === false ||
      statusCode < 300 || statusCode >= 400) {
    response.responseUrl = this._currentUrl;
    response.redirects = this._redirects;
    this.emit("response", response);

    // Clean up
    this._requestBodyBuffers = [];
    return;
  }

  // The response is a redirect, so abort the current request
  abortRequest(this._currentRequest);
  // Discard the remainder of the response to avoid waiting for data
  response.destroy();

  // RFC7231§6.4: A client SHOULD detect and intervene
  // in cyclical redirections (i.e., "infinite" redirection loops).
  if (++this._redirectCount > this._options.maxRedirects) {
    this.emit("error", new TooManyRedirectsError());
    return;
  }

  // Store the request headers if applicable
  var requestHeaders;
  var beforeRedirect = this._options.beforeRedirect;
  if (beforeRedirect) {
    requestHeaders = Object.assign({
      // The Host header was set by nativeProtocol.request
      Host: response.req.getHeader("host"),
    }, this._options.headers);
  }

  // RFC7231§6.4: Automatic redirection needs to done with
  // care for methods not known to be safe, […]
  // RFC7231§6.4.2–3: For historical reasons, a user agent MAY change
  // the request method from POST to GET for the subsequent request.
  var method = this._options.method;
  if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" ||
      // RFC7231§6.4.4: The 303 (See Other) status code indicates that
      // the server is redirecting the user agent to a different resource […]
      // A user agent can perform a retrieval request targeting that URI
      // (a GET or HEAD request if using HTTP) […]
      (statusCode === 303) && !/^(?:GET|HEAD)$/.test(this._options.method)) {
    this._options.method = "GET";
    // Drop a possible entity and headers related to it
    this._requestBodyBuffers = [];
    removeMatchingHeaders(/^content-/i, this._options.headers);
  }

  // Drop the Host header, as the redirect might lead to a different host
  var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);

  // If the redirect is relative, carry over the host of the last request
  var currentUrlParts = url$1.parse(this._currentUrl);
  var currentHost = currentHostHeader || currentUrlParts.host;
  var currentUrl = /^\w+:/.test(location) ? this._currentUrl :
    url$1.format(Object.assign(currentUrlParts, { host: currentHost }));

  // Determine the URL of the redirection
  var redirectUrl;
  try {
    redirectUrl = url$1.resolve(currentUrl, location);
  }
  catch (cause) {
    this.emit("error", new RedirectionError(cause));
    return;
  }

  // Create the redirected request
  debug("redirecting to", redirectUrl);
  this._isRedirect = true;
  var redirectUrlParts = url$1.parse(redirectUrl);
  Object.assign(this._options, redirectUrlParts);

  // Drop confidential headers when redirecting to a less secure protocol
  // or to a different domain that is not a superdomain
  if (redirectUrlParts.protocol !== currentUrlParts.protocol &&
     redirectUrlParts.protocol !== "https:" ||
     redirectUrlParts.host !== currentHost &&
     !isSubdomain(redirectUrlParts.host, currentHost)) {
    removeMatchingHeaders(/^(?:authorization|cookie)$/i, this._options.headers);
  }

  // Evaluate the beforeRedirect callback
  if (typeof beforeRedirect === "function") {
    var responseDetails = {
      headers: response.headers,
      statusCode: statusCode,
    };
    var requestDetails = {
      url: currentUrl,
      method: method,
      headers: requestHeaders,
    };
    try {
      beforeRedirect(this._options, responseDetails, requestDetails);
    }
    catch (err) {
      this.emit("error", err);
      return;
    }
    this._sanitizeOptions(this._options);
  }

  // Perform the redirected request
  try {
    this._performRequest();
  }
  catch (cause) {
    this.emit("error", new RedirectionError(cause));
  }
};

// Wraps the key/value object of protocols with redirect functionality
function wrap(protocols) {
  // Default settings
  var exports = {
    maxRedirects: 21,
    maxBodyLength: 10 * 1024 * 1024,
  };

  // Wrap each protocol
  var nativeProtocols = {};
  Object.keys(protocols).forEach(function (scheme) {
    var protocol = scheme + ":";
    var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
    var wrappedProtocol = exports[scheme] = Object.create(nativeProtocol);

    // Executes a request, following redirects
    function request(input, options, callback) {
      // Parse parameters
      if (typeof input === "string") {
        var urlStr = input;
        try {
          input = urlToOptions(new URL(urlStr));
        }
        catch (err) {
          /* istanbul ignore next */
          input = url$1.parse(urlStr);
        }
      }
      else if (URL && (input instanceof URL)) {
        input = urlToOptions(input);
      }
      else {
        callback = options;
        options = input;
        input = { protocol: protocol };
      }
      if (typeof options === "function") {
        callback = options;
        options = null;
      }

      // Set defaults
      options = Object.assign({
        maxRedirects: exports.maxRedirects,
        maxBodyLength: exports.maxBodyLength,
      }, input, options);
      options.nativeProtocols = nativeProtocols;

      assert.equal(options.protocol, protocol, "protocol mismatch");
      debug("options", options);
      return new RedirectableRequest(options, callback);
    }

    // Executes a GET request, following redirects
    function get(input, options, callback) {
      var wrappedRequest = wrappedProtocol.request(input, options, callback);
      wrappedRequest.end();
      return wrappedRequest;
    }

    // Expose the properties on the wrapped protocol
    Object.defineProperties(wrappedProtocol, {
      request: { value: request, configurable: true, enumerable: true, writable: true },
      get: { value: get, configurable: true, enumerable: true, writable: true },
    });
  });
  return exports;
}

/* istanbul ignore next */
function noop() { /* empty */ }

// from https://github.com/nodejs/node/blob/master/lib/internal/url.js
function urlToOptions(urlObject) {
  var options = {
    protocol: urlObject.protocol,
    hostname: urlObject.hostname.startsWith("[") ?
      /* istanbul ignore next */
      urlObject.hostname.slice(1, -1) :
      urlObject.hostname,
    hash: urlObject.hash,
    search: urlObject.search,
    pathname: urlObject.pathname,
    path: urlObject.pathname + urlObject.search,
    href: urlObject.href,
  };
  if (urlObject.port !== "") {
    options.port = Number(urlObject.port);
  }
  return options;
}

function removeMatchingHeaders(regex, headers) {
  var lastValue;
  for (var header in headers) {
    if (regex.test(header)) {
      lastValue = headers[header];
      delete headers[header];
    }
  }
  return (lastValue === null || typeof lastValue === "undefined") ?
    undefined : String(lastValue).trim();
}

function createErrorType(code, defaultMessage) {
  function CustomError(cause) {
    Error.captureStackTrace(this, this.constructor);
    if (!cause) {
      this.message = defaultMessage;
    }
    else {
      this.message = defaultMessage + ": " + cause.message;
      this.cause = cause;
    }
  }
  CustomError.prototype = new Error();
  CustomError.prototype.constructor = CustomError;
  CustomError.prototype.name = "Error [" + code + "]";
  CustomError.prototype.code = code;
  return CustomError;
}

function abortRequest(request) {
  for (var e = 0; e < events.length; e++) {
    request.removeListener(events[e], eventHandlers[events[e]]);
  }
  request.on("error", noop);
  request.abort();
}

function isSubdomain(subdomain, domain) {
  const dot = subdomain.length - domain.length - 1;
  return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
}

// Exports
followRedirects.exports = wrap({ http: http$1, https: https$1 });
followRedirects.exports.wrap = wrap;

var data = {
  "version": "0.26.1"
};

var utils$7 = utils$f;
var settle = settle$2;
var buildFullPath = buildFullPath$2;
var buildURL$1 = buildURL$3;
var http = require$$1;
var https = require$$2;
var httpFollow = followRedirects.exports.http;
var httpsFollow = followRedirects.exports.https;
var url = require$$0;
var zlib = require$$8;
var VERSION$1 = data.version;
var createError = createError$3;
var enhanceError$1 = enhanceError$3;
var transitionalDefaults$1 = transitional;
var Cancel$2 = Cancel_1;

var isHttps = /https:?/;

/**
 *
 * @param {http.ClientRequestArgs} options
 * @param {AxiosProxyConfig} proxy
 * @param {string} location
 */
function setProxy(options, proxy, location) {
  options.hostname = proxy.host;
  options.host = proxy.host;
  options.port = proxy.port;
  options.path = location;

  // Basic proxy authorization
  if (proxy.auth) {
    var base64 = Buffer.from(proxy.auth.username + ':' + proxy.auth.password, 'utf8').toString('base64');
    options.headers['Proxy-Authorization'] = 'Basic ' + base64;
  }

  // If a proxy is used, any redirects must also pass through the proxy
  options.beforeRedirect = function beforeRedirect(redirection) {
    redirection.headers.host = redirection.host;
    setProxy(redirection, proxy, redirection.href);
  };
}

/*eslint consistent-return:0*/
var http_1 = function httpAdapter(config) {
  return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
    var onCanceled;
    function done() {
      if (config.cancelToken) {
        config.cancelToken.unsubscribe(onCanceled);
      }

      if (config.signal) {
        config.signal.removeEventListener('abort', onCanceled);
      }
    }
    var resolve = function resolve(value) {
      done();
      resolvePromise(value);
    };
    var rejected = false;
    var reject = function reject(value) {
      done();
      rejected = true;
      rejectPromise(value);
    };
    var data = config.data;
    var headers = config.headers;
    var headerNames = {};

    Object.keys(headers).forEach(function storeLowerName(name) {
      headerNames[name.toLowerCase()] = name;
    });

    // Set User-Agent (required by some servers)
    // See https://github.com/axios/axios/issues/69
    if ('user-agent' in headerNames) {
      // User-Agent is specified; handle case where no UA header is desired
      if (!headers[headerNames['user-agent']]) {
        delete headers[headerNames['user-agent']];
      }
      // Otherwise, use specified value
    } else {
      // Only set header if it hasn't been set in config
      headers['User-Agent'] = 'axios/' + VERSION$1;
    }

    if (data && !utils$7.isStream(data)) {
      if (Buffer.isBuffer(data)) ; else if (utils$7.isArrayBuffer(data)) {
        data = Buffer.from(new Uint8Array(data));
      } else if (utils$7.isString(data)) {
        data = Buffer.from(data, 'utf-8');
      } else {
        return reject(createError(
          'Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream',
          config
        ));
      }

      if (config.maxBodyLength > -1 && data.length > config.maxBodyLength) {
        return reject(createError('Request body larger than maxBodyLength limit', config));
      }

      // Add Content-Length header if data exists
      if (!headerNames['content-length']) {
        headers['Content-Length'] = data.length;
      }
    }

    // HTTP basic authentication
    var auth = undefined;
    if (config.auth) {
      var username = config.auth.username || '';
      var password = config.auth.password || '';
      auth = username + ':' + password;
    }

    // Parse url
    var fullPath = buildFullPath(config.baseURL, config.url);
    var parsed = url.parse(fullPath);
    var protocol = parsed.protocol || 'http:';

    if (!auth && parsed.auth) {
      var urlAuth = parsed.auth.split(':');
      var urlUsername = urlAuth[0] || '';
      var urlPassword = urlAuth[1] || '';
      auth = urlUsername + ':' + urlPassword;
    }

    if (auth && headerNames.authorization) {
      delete headers[headerNames.authorization];
    }

    var isHttpsRequest = isHttps.test(protocol);
    var agent = isHttpsRequest ? config.httpsAgent : config.httpAgent;

    try {
      buildURL$1(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, '');
    } catch (err) {
      var customErr = new Error(err.message);
      customErr.config = config;
      customErr.url = config.url;
      customErr.exists = true;
      reject(customErr);
    }

    var options = {
      path: buildURL$1(parsed.path, config.params, config.paramsSerializer).replace(/^\?/, ''),
      method: config.method.toUpperCase(),
      headers: headers,
      agent: agent,
      agents: { http: config.httpAgent, https: config.httpsAgent },
      auth: auth
    };

    if (config.socketPath) {
      options.socketPath = config.socketPath;
    } else {
      options.hostname = parsed.hostname;
      options.port = parsed.port;
    }

    var proxy = config.proxy;
    if (!proxy && proxy !== false) {
      var proxyEnv = protocol.slice(0, -1) + '_proxy';
      var proxyUrl = process.env[proxyEnv] || process.env[proxyEnv.toUpperCase()];
      if (proxyUrl) {
        var parsedProxyUrl = url.parse(proxyUrl);
        var noProxyEnv = process.env.no_proxy || process.env.NO_PROXY;
        var shouldProxy = true;

        if (noProxyEnv) {
          var noProxy = noProxyEnv.split(',').map(function trim(s) {
            return s.trim();
          });

          shouldProxy = !noProxy.some(function proxyMatch(proxyElement) {
            if (!proxyElement) {
              return false;
            }
            if (proxyElement === '*') {
              return true;
            }
            if (proxyElement[0] === '.' &&
                parsed.hostname.substr(parsed.hostname.length - proxyElement.length) === proxyElement) {
              return true;
            }

            return parsed.hostname === proxyElement;
          });
        }

        if (shouldProxy) {
          proxy = {
            host: parsedProxyUrl.hostname,
            port: parsedProxyUrl.port,
            protocol: parsedProxyUrl.protocol
          };

          if (parsedProxyUrl.auth) {
            var proxyUrlAuth = parsedProxyUrl.auth.split(':');
            proxy.auth = {
              username: proxyUrlAuth[0],
              password: proxyUrlAuth[1]
            };
          }
        }
      }
    }

    if (proxy) {
      options.headers.host = parsed.hostname + (parsed.port ? ':' + parsed.port : '');
      setProxy(options, proxy, protocol + '//' + parsed.hostname + (parsed.port ? ':' + parsed.port : '') + options.path);
    }

    var transport;
    var isHttpsProxy = isHttpsRequest && (proxy ? isHttps.test(proxy.protocol) : true);
    if (config.transport) {
      transport = config.transport;
    } else if (config.maxRedirects === 0) {
      transport = isHttpsProxy ? https : http;
    } else {
      if (config.maxRedirects) {
        options.maxRedirects = config.maxRedirects;
      }
      transport = isHttpsProxy ? httpsFollow : httpFollow;
    }

    if (config.maxBodyLength > -1) {
      options.maxBodyLength = config.maxBodyLength;
    }

    if (config.insecureHTTPParser) {
      options.insecureHTTPParser = config.insecureHTTPParser;
    }

    // Create the request
    var req = transport.request(options, function handleResponse(res) {
      if (req.aborted) return;

      // uncompress the response body transparently if required
      var stream = res;

      // return the last request in case of redirects
      var lastRequest = res.req || req;


      // if no content, is HEAD request or decompress disabled we should not decompress
      if (res.statusCode !== 204 && lastRequest.method !== 'HEAD' && config.decompress !== false) {
        switch (res.headers['content-encoding']) {
        /*eslint default-case:0*/
        case 'gzip':
        case 'compress':
        case 'deflate':
        // add the unzipper to the body stream processing pipeline
          stream = stream.pipe(zlib.createUnzip());

          // remove the content-encoding in order to not confuse downstream operations
          delete res.headers['content-encoding'];
          break;
        }
      }

      var response = {
        status: res.statusCode,
        statusText: res.statusMessage,
        headers: res.headers,
        config: config,
        request: lastRequest
      };

      if (config.responseType === 'stream') {
        response.data = stream;
        settle(resolve, reject, response);
      } else {
        var responseBuffer = [];
        var totalResponseBytes = 0;
        stream.on('data', function handleStreamData(chunk) {
          responseBuffer.push(chunk);
          totalResponseBytes += chunk.length;

          // make sure the content length is not over the maxContentLength if specified
          if (config.maxContentLength > -1 && totalResponseBytes > config.maxContentLength) {
            // stream.destoy() emit aborted event before calling reject() on Node.js v16
            rejected = true;
            stream.destroy();
            reject(createError('maxContentLength size of ' + config.maxContentLength + ' exceeded',
              config, null, lastRequest));
          }
        });

        stream.on('aborted', function handlerStreamAborted() {
          if (rejected) {
            return;
          }
          stream.destroy();
          reject(createError('error request aborted', config, 'ERR_REQUEST_ABORTED', lastRequest));
        });

        stream.on('error', function handleStreamError(err) {
          if (req.aborted) return;
          reject(enhanceError$1(err, config, null, lastRequest));
        });

        stream.on('end', function handleStreamEnd() {
          try {
            var responseData = responseBuffer.length === 1 ? responseBuffer[0] : Buffer.concat(responseBuffer);
            if (config.responseType !== 'arraybuffer') {
              responseData = responseData.toString(config.responseEncoding);
              if (!config.responseEncoding || config.responseEncoding === 'utf8') {
                responseData = utils$7.stripBOM(responseData);
              }
            }
            response.data = responseData;
          } catch (err) {
            reject(enhanceError$1(err, config, err.code, response.request, response));
          }
          settle(resolve, reject, response);
        });
      }
    });

    // Handle errors
    req.on('error', function handleRequestError(err) {
      if (req.aborted && err.code !== 'ERR_FR_TOO_MANY_REDIRECTS') return;
      reject(enhanceError$1(err, config, null, req));
    });

    // set tcp keep alive to prevent drop connection by peer
    req.on('socket', function handleRequestSocket(socket) {
      // default interval of sending ack packet is 1 minute
      socket.setKeepAlive(true, 1000 * 60);
    });

    // Handle request timeout
    if (config.timeout) {
      // This is forcing a int timeout to avoid problems if the `req` interface doesn't handle other types.
      var timeout = parseInt(config.timeout, 10);

      if (isNaN(timeout)) {
        reject(createError(
          'error trying to parse `config.timeout` to int',
          config,
          'ERR_PARSE_TIMEOUT',
          req
        ));

        return;
      }

      // Sometime, the response will be very slow, and does not respond, the connect event will be block by event loop system.
      // And timer callback will be fired, and abort() will be invoked before connection, then get "socket hang up" and code ECONNRESET.
      // At this time, if we have a large number of request, nodejs will hang up some socket on background. and the number will up and up.
      // And then these socket which be hang up will devoring CPU little by little.
      // ClientRequest.setTimeout will be fired on the specify milliseconds, and can make sure that abort() will be fired after connect.
      req.setTimeout(timeout, function handleRequestTimeout() {
        req.abort();
        var timeoutErrorMessage = '';
        if (config.timeoutErrorMessage) {
          timeoutErrorMessage = config.timeoutErrorMessage;
        } else {
          timeoutErrorMessage = 'timeout of ' + config.timeout + 'ms exceeded';
        }
        var transitional = config.transitional || transitionalDefaults$1;
        reject(createError(
          timeoutErrorMessage,
          config,
          transitional.clarifyTimeoutError ? 'ETIMEDOUT' : 'ECONNABORTED',
          req
        ));
      });
    }

    if (config.cancelToken || config.signal) {
      // Handle cancellation
      // eslint-disable-next-line func-names
      onCanceled = function(cancel) {
        if (req.aborted) return;

        req.abort();
        reject(!cancel || (cancel && cancel.type) ? new Cancel$2('canceled') : cancel);
      };

      config.cancelToken && config.cancelToken.subscribe(onCanceled);
      if (config.signal) {
        config.signal.aborted ? onCanceled() : config.signal.addEventListener('abort', onCanceled);
      }
    }


    // Send the request
    if (utils$7.isStream(data)) {
      data.on('error', function handleStreamError(err) {
        reject(enhanceError$1(err, config, null, req));
      }).pipe(req);
    } else {
      req.end(data);
    }
  });
};

var utils$6 = utils$f;
var normalizeHeaderName = normalizeHeaderName$1;
var enhanceError = enhanceError$3;
var transitionalDefaults = transitional;

var DEFAULT_CONTENT_TYPE = {
  'Content-Type': 'application/x-www-form-urlencoded'
};

function setContentTypeIfUnset(headers, value) {
  if (!utils$6.isUndefined(headers) && utils$6.isUndefined(headers['Content-Type'])) {
    headers['Content-Type'] = value;
  }
}

function getDefaultAdapter() {
  var adapter;
  if (typeof XMLHttpRequest !== 'undefined') {
    // For browsers use XHR adapter
    adapter = xhr;
  } else if (typeof process !== 'undefined' && Object.prototype.toString.call(process) === '[object process]') {
    // For node use HTTP adapter
    adapter = http_1;
  }
  return adapter;
}

function stringifySafely(rawValue, parser, encoder) {
  if (utils$6.isString(rawValue)) {
    try {
      (parser || JSON.parse)(rawValue);
      return utils$6.trim(rawValue);
    } catch (e) {
      if (e.name !== 'SyntaxError') {
        throw e;
      }
    }
  }

  return (encoder || JSON.stringify)(rawValue);
}

var defaults$3 = {

  transitional: transitionalDefaults,

  adapter: getDefaultAdapter(),

  transformRequest: [function transformRequest(data, headers) {
    normalizeHeaderName(headers, 'Accept');
    normalizeHeaderName(headers, 'Content-Type');

    if (utils$6.isFormData(data) ||
      utils$6.isArrayBuffer(data) ||
      utils$6.isBuffer(data) ||
      utils$6.isStream(data) ||
      utils$6.isFile(data) ||
      utils$6.isBlob(data)
    ) {
      return data;
    }
    if (utils$6.isArrayBufferView(data)) {
      return data.buffer;
    }
    if (utils$6.isURLSearchParams(data)) {
      setContentTypeIfUnset(headers, 'application/x-www-form-urlencoded;charset=utf-8');
      return data.toString();
    }
    if (utils$6.isObject(data) || (headers && headers['Content-Type'] === 'application/json')) {
      setContentTypeIfUnset(headers, 'application/json');
      return stringifySafely(data);
    }
    return data;
  }],

  transformResponse: [function transformResponse(data) {
    var transitional = this.transitional || defaults$3.transitional;
    var silentJSONParsing = transitional && transitional.silentJSONParsing;
    var forcedJSONParsing = transitional && transitional.forcedJSONParsing;
    var strictJSONParsing = !silentJSONParsing && this.responseType === 'json';

    if (strictJSONParsing || (forcedJSONParsing && utils$6.isString(data) && data.length)) {
      try {
        return JSON.parse(data);
      } catch (e) {
        if (strictJSONParsing) {
          if (e.name === 'SyntaxError') {
            throw enhanceError(e, this, 'E_JSON_PARSE');
          }
          throw e;
        }
      }
    }

    return data;
  }],

  /**
   * A timeout in milliseconds to abort a request. If set to 0 (default) a
   * timeout is not created.
   */
  timeout: 0,

  xsrfCookieName: 'XSRF-TOKEN',
  xsrfHeaderName: 'X-XSRF-TOKEN',

  maxContentLength: -1,
  maxBodyLength: -1,

  validateStatus: function validateStatus(status) {
    return status >= 200 && status < 300;
  },

  headers: {
    common: {
      'Accept': 'application/json, text/plain, */*'
    }
  }
};

utils$6.forEach(['delete', 'get', 'head'], function forEachMethodNoData(method) {
  defaults$3.headers[method] = {};
});

utils$6.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  defaults$3.headers[method] = utils$6.merge(DEFAULT_CONTENT_TYPE);
});

var defaults_1 = defaults$3;

var utils$5 = utils$f;
var defaults$2 = defaults_1;

/**
 * Transform the data for a request or a response
 *
 * @param {Object|String} data The data to be transformed
 * @param {Array} headers The headers for the request or response
 * @param {Array|Function} fns A single function or Array of functions
 * @returns {*} The resulting transformed data
 */
var transformData$1 = function transformData(data, headers, fns) {
  var context = this || defaults$2;
  /*eslint no-param-reassign:0*/
  utils$5.forEach(fns, function transform(fn) {
    data = fn.call(context, data, headers);
  });

  return data;
};

var isCancel$1 = function isCancel(value) {
  return !!(value && value.__CANCEL__);
};

var utils$4 = utils$f;
var transformData = transformData$1;
var isCancel = isCancel$1;
var defaults$1 = defaults_1;
var Cancel$1 = Cancel_1;

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
function throwIfCancellationRequested(config) {
  if (config.cancelToken) {
    config.cancelToken.throwIfRequested();
  }

  if (config.signal && config.signal.aborted) {
    throw new Cancel$1('canceled');
  }
}

/**
 * Dispatch a request to the server using the configured adapter.
 *
 * @param {object} config The config that is to be used for the request
 * @returns {Promise} The Promise to be fulfilled
 */
var dispatchRequest$1 = function dispatchRequest(config) {
  throwIfCancellationRequested(config);

  // Ensure headers exist
  config.headers = config.headers || {};

  // Transform request data
  config.data = transformData.call(
    config,
    config.data,
    config.headers,
    config.transformRequest
  );

  // Flatten headers
  config.headers = utils$4.merge(
    config.headers.common || {},
    config.headers[config.method] || {},
    config.headers
  );

  utils$4.forEach(
    ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],
    function cleanHeaderConfig(method) {
      delete config.headers[method];
    }
  );

  var adapter = config.adapter || defaults$1.adapter;

  return adapter(config).then(function onAdapterResolution(response) {
    throwIfCancellationRequested(config);

    // Transform response data
    response.data = transformData.call(
      config,
      response.data,
      response.headers,
      config.transformResponse
    );

    return response;
  }, function onAdapterRejection(reason) {
    if (!isCancel(reason)) {
      throwIfCancellationRequested(config);

      // Transform response data
      if (reason && reason.response) {
        reason.response.data = transformData.call(
          config,
          reason.response.data,
          reason.response.headers,
          config.transformResponse
        );
      }
    }

    return Promise.reject(reason);
  });
};

var utils$3 = utils$f;

/**
 * Config-specific merge-function which creates a new config-object
 * by merging two configuration objects together.
 *
 * @param {Object} config1
 * @param {Object} config2
 * @returns {Object} New object resulting from merging config2 to config1
 */
var mergeConfig$2 = function mergeConfig(config1, config2) {
  // eslint-disable-next-line no-param-reassign
  config2 = config2 || {};
  var config = {};

  function getMergedValue(target, source) {
    if (utils$3.isPlainObject(target) && utils$3.isPlainObject(source)) {
      return utils$3.merge(target, source);
    } else if (utils$3.isPlainObject(source)) {
      return utils$3.merge({}, source);
    } else if (utils$3.isArray(source)) {
      return source.slice();
    }
    return source;
  }

  // eslint-disable-next-line consistent-return
  function mergeDeepProperties(prop) {
    if (!utils$3.isUndefined(config2[prop])) {
      return getMergedValue(config1[prop], config2[prop]);
    } else if (!utils$3.isUndefined(config1[prop])) {
      return getMergedValue(undefined, config1[prop]);
    }
  }

  // eslint-disable-next-line consistent-return
  function valueFromConfig2(prop) {
    if (!utils$3.isUndefined(config2[prop])) {
      return getMergedValue(undefined, config2[prop]);
    }
  }

  // eslint-disable-next-line consistent-return
  function defaultToConfig2(prop) {
    if (!utils$3.isUndefined(config2[prop])) {
      return getMergedValue(undefined, config2[prop]);
    } else if (!utils$3.isUndefined(config1[prop])) {
      return getMergedValue(undefined, config1[prop]);
    }
  }

  // eslint-disable-next-line consistent-return
  function mergeDirectKeys(prop) {
    if (prop in config2) {
      return getMergedValue(config1[prop], config2[prop]);
    } else if (prop in config1) {
      return getMergedValue(undefined, config1[prop]);
    }
  }

  var mergeMap = {
    'url': valueFromConfig2,
    'method': valueFromConfig2,
    'data': valueFromConfig2,
    'baseURL': defaultToConfig2,
    'transformRequest': defaultToConfig2,
    'transformResponse': defaultToConfig2,
    'paramsSerializer': defaultToConfig2,
    'timeout': defaultToConfig2,
    'timeoutMessage': defaultToConfig2,
    'withCredentials': defaultToConfig2,
    'adapter': defaultToConfig2,
    'responseType': defaultToConfig2,
    'xsrfCookieName': defaultToConfig2,
    'xsrfHeaderName': defaultToConfig2,
    'onUploadProgress': defaultToConfig2,
    'onDownloadProgress': defaultToConfig2,
    'decompress': defaultToConfig2,
    'maxContentLength': defaultToConfig2,
    'maxBodyLength': defaultToConfig2,
    'transport': defaultToConfig2,
    'httpAgent': defaultToConfig2,
    'httpsAgent': defaultToConfig2,
    'cancelToken': defaultToConfig2,
    'socketPath': defaultToConfig2,
    'responseEncoding': defaultToConfig2,
    'validateStatus': mergeDirectKeys
  };

  utils$3.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
    var merge = mergeMap[prop] || mergeDeepProperties;
    var configValue = merge(prop);
    (utils$3.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
  });

  return config;
};

var VERSION = data.version;

var validators$1 = {};

// eslint-disable-next-line func-names
['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach(function(type, i) {
  validators$1[type] = function validator(thing) {
    return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;
  };
});

var deprecatedWarnings = {};

/**
 * Transitional option validator
 * @param {function|boolean?} validator - set to false if the transitional option has been removed
 * @param {string?} version - deprecated version / removed since version
 * @param {string?} message - some message with additional info
 * @returns {function}
 */
validators$1.transitional = function transitional(validator, version, message) {
  function formatMessage(opt, desc) {
    return '[Axios v' + VERSION + '] Transitional option \'' + opt + '\'' + desc + (message ? '. ' + message : '');
  }

  // eslint-disable-next-line func-names
  return function(value, opt, opts) {
    if (validator === false) {
      throw new Error(formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')));
    }

    if (version && !deprecatedWarnings[opt]) {
      deprecatedWarnings[opt] = true;
      // eslint-disable-next-line no-console
      console.warn(
        formatMessage(
          opt,
          ' has been deprecated since v' + version + ' and will be removed in the near future'
        )
      );
    }

    return validator ? validator(value, opt, opts) : true;
  };
};

/**
 * Assert object's properties type
 * @param {object} options
 * @param {object} schema
 * @param {boolean?} allowUnknown
 */

function assertOptions(options, schema, allowUnknown) {
  if (typeof options !== 'object') {
    throw new TypeError('options must be an object');
  }
  var keys = Object.keys(options);
  var i = keys.length;
  while (i-- > 0) {
    var opt = keys[i];
    var validator = schema[opt];
    if (validator) {
      var value = options[opt];
      var result = value === undefined || validator(value, opt, options);
      if (result !== true) {
        throw new TypeError('option ' + opt + ' must be ' + result);
      }
      continue;
    }
    if (allowUnknown !== true) {
      throw Error('Unknown option ' + opt);
    }
  }
}

var validator$1 = {
  assertOptions: assertOptions,
  validators: validators$1
};

var utils$2 = utils$f;
var buildURL = buildURL$3;
var InterceptorManager = InterceptorManager_1;
var dispatchRequest = dispatchRequest$1;
var mergeConfig$1 = mergeConfig$2;
var validator = validator$1;

var validators = validator.validators;
/**
 * Create a new instance of Axios
 *
 * @param {Object} instanceConfig The default config for the instance
 */
function Axios$1(instanceConfig) {
  this.defaults = instanceConfig;
  this.interceptors = {
    request: new InterceptorManager(),
    response: new InterceptorManager()
  };
}

/**
 * Dispatch a request
 *
 * @param {Object} config The config specific for this request (merged with this.defaults)
 */
Axios$1.prototype.request = function request(configOrUrl, config) {
  /*eslint no-param-reassign:0*/
  // Allow for axios('example/url'[, config]) a la fetch API
  if (typeof configOrUrl === 'string') {
    config = config || {};
    config.url = configOrUrl;
  } else {
    config = configOrUrl || {};
  }

  config = mergeConfig$1(this.defaults, config);

  // Set config.method
  if (config.method) {
    config.method = config.method.toLowerCase();
  } else if (this.defaults.method) {
    config.method = this.defaults.method.toLowerCase();
  } else {
    config.method = 'get';
  }

  var transitional = config.transitional;

  if (transitional !== undefined) {
    validator.assertOptions(transitional, {
      silentJSONParsing: validators.transitional(validators.boolean),
      forcedJSONParsing: validators.transitional(validators.boolean),
      clarifyTimeoutError: validators.transitional(validators.boolean)
    }, false);
  }

  // filter out skipped interceptors
  var requestInterceptorChain = [];
  var synchronousRequestInterceptors = true;
  this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {
    if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {
      return;
    }

    synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;

    requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);
  });

  var responseInterceptorChain = [];
  this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {
    responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);
  });

  var promise;

  if (!synchronousRequestInterceptors) {
    var chain = [dispatchRequest, undefined];

    Array.prototype.unshift.apply(chain, requestInterceptorChain);
    chain = chain.concat(responseInterceptorChain);

    promise = Promise.resolve(config);
    while (chain.length) {
      promise = promise.then(chain.shift(), chain.shift());
    }

    return promise;
  }


  var newConfig = config;
  while (requestInterceptorChain.length) {
    var onFulfilled = requestInterceptorChain.shift();
    var onRejected = requestInterceptorChain.shift();
    try {
      newConfig = onFulfilled(newConfig);
    } catch (error) {
      onRejected(error);
      break;
    }
  }

  try {
    promise = dispatchRequest(newConfig);
  } catch (error) {
    return Promise.reject(error);
  }

  while (responseInterceptorChain.length) {
    promise = promise.then(responseInterceptorChain.shift(), responseInterceptorChain.shift());
  }

  return promise;
};

Axios$1.prototype.getUri = function getUri(config) {
  config = mergeConfig$1(this.defaults, config);
  return buildURL(config.url, config.params, config.paramsSerializer).replace(/^\?/, '');
};

// Provide aliases for supported request methods
utils$2.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {
  /*eslint func-names:0*/
  Axios$1.prototype[method] = function(url, config) {
    return this.request(mergeConfig$1(config || {}, {
      method: method,
      url: url,
      data: (config || {}).data
    }));
  };
});

utils$2.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {
  /*eslint func-names:0*/
  Axios$1.prototype[method] = function(url, data, config) {
    return this.request(mergeConfig$1(config || {}, {
      method: method,
      url: url,
      data: data
    }));
  };
});

var Axios_1 = Axios$1;

var Cancel = Cancel_1;

/**
 * A `CancelToken` is an object that can be used to request cancellation of an operation.
 *
 * @class
 * @param {Function} executor The executor function.
 */
function CancelToken$1(executor) {
  if (typeof executor !== 'function') {
    throw new TypeError('executor must be a function.');
  }

  var resolvePromise;

  this.promise = new Promise(function promiseExecutor(resolve) {
    resolvePromise = resolve;
  });

  var token = this;

  // eslint-disable-next-line func-names
  this.promise.then(function(cancel) {
    if (!token._listeners) return;

    var i;
    var l = token._listeners.length;

    for (i = 0; i < l; i++) {
      token._listeners[i](cancel);
    }
    token._listeners = null;
  });

  // eslint-disable-next-line func-names
  this.promise.then = function(onfulfilled) {
    var _resolve;
    // eslint-disable-next-line func-names
    var promise = new Promise(function(resolve) {
      token.subscribe(resolve);
      _resolve = resolve;
    }).then(onfulfilled);

    promise.cancel = function reject() {
      token.unsubscribe(_resolve);
    };

    return promise;
  };

  executor(function cancel(message) {
    if (token.reason) {
      // Cancellation has already been requested
      return;
    }

    token.reason = new Cancel(message);
    resolvePromise(token.reason);
  });
}

/**
 * Throws a `Cancel` if cancellation has been requested.
 */
CancelToken$1.prototype.throwIfRequested = function throwIfRequested() {
  if (this.reason) {
    throw this.reason;
  }
};

/**
 * Subscribe to the cancel signal
 */

CancelToken$1.prototype.subscribe = function subscribe(listener) {
  if (this.reason) {
    listener(this.reason);
    return;
  }

  if (this._listeners) {
    this._listeners.push(listener);
  } else {
    this._listeners = [listener];
  }
};

/**
 * Unsubscribe from the cancel signal
 */

CancelToken$1.prototype.unsubscribe = function unsubscribe(listener) {
  if (!this._listeners) {
    return;
  }
  var index = this._listeners.indexOf(listener);
  if (index !== -1) {
    this._listeners.splice(index, 1);
  }
};

/**
 * Returns an object that contains a new `CancelToken` and a function that, when called,
 * cancels the `CancelToken`.
 */
CancelToken$1.source = function source() {
  var cancel;
  var token = new CancelToken$1(function executor(c) {
    cancel = c;
  });
  return {
    token: token,
    cancel: cancel
  };
};

var CancelToken_1 = CancelToken$1;

/**
 * Syntactic sugar for invoking a function and expanding an array for arguments.
 *
 * Common use case would be to use `Function.prototype.apply`.
 *
 *  ```js
 *  function f(x, y, z) {}
 *  var args = [1, 2, 3];
 *  f.apply(null, args);
 *  ```
 *
 * With `spread` this example can be re-written.
 *
 *  ```js
 *  spread(function(x, y, z) {})([1, 2, 3]);
 *  ```
 *
 * @param {Function} callback
 * @returns {Function}
 */
var spread = function spread(callback) {
  return function wrap(arr) {
    return callback.apply(null, arr);
  };
};

var utils$1 = utils$f;

/**
 * Determines whether the payload is an error thrown by Axios
 *
 * @param {*} payload The value to test
 * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false
 */
var isAxiosError = function isAxiosError(payload) {
  return utils$1.isObject(payload) && (payload.isAxiosError === true);
};

var utils = utils$f;
var bind = bind$2;
var Axios = Axios_1;
var mergeConfig = mergeConfig$2;
var defaults = defaults_1;

/**
 * Create an instance of Axios
 *
 * @param {Object} defaultConfig The default config for the instance
 * @return {Axios} A new instance of Axios
 */
function createInstance(defaultConfig) {
  var context = new Axios(defaultConfig);
  var instance = bind(Axios.prototype.request, context);

  // Copy axios.prototype to instance
  utils.extend(instance, Axios.prototype, context);

  // Copy context to instance
  utils.extend(instance, context);

  // Factory for creating new instances
  instance.create = function create(instanceConfig) {
    return createInstance(mergeConfig(defaultConfig, instanceConfig));
  };

  return instance;
}

// Create the default instance to be exported
var axios$1 = createInstance(defaults);

// Expose Axios class to allow class inheritance
axios$1.Axios = Axios;

// Expose Cancel & CancelToken
axios$1.Cancel = Cancel_1;
axios$1.CancelToken = CancelToken_1;
axios$1.isCancel = isCancel$1;
axios$1.VERSION = data.version;

// Expose all/spread
axios$1.all = function all(promises) {
  return Promise.all(promises);
};
axios$1.spread = spread;

// Expose isAxiosError
axios$1.isAxiosError = isAxiosError;

axios$2.exports = axios$1;

// Allow use of default import syntax in TypeScript
axios$2.exports.default = axios$1;

var axios = axios$2.exports;

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-10-14 10:45:50
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-01 10:11:08
 * @FilePath: /jwb-vue3-ui/packages/utils/catch.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const magusCloudCatch = {
    Cache: {
        /**
         * 总容量5M
         * 存入缓存，支持字符串类型、json对象的存储
         * 页面关闭后依然有效 ie7+都有效
         * @param key 缓存key
         * @param stringVal
         * @time 数字 缓存有效时间（秒） 默认10年（永久）
         * 注：localStorage 方法存储的数据没有时间限制。第二天、第二周或下一年之后，数据依然可用。不能控制缓存时间，故此扩展
         * */
        getNoExpireTime(key) {
            if (!localStorage) {
                return false;
            }
            return localStorage.getItem(key);
        },
        putNoExpireTime(key, stringVal) {
            try {
                if (!localStorage) {
                    return false;
                }
                return localStorage.setItem(key, stringVal);
            }
            catch (e) {
                return e;
            }
        },
        put(key, stringVal, time) {
            try {
                if (!localStorage) {
                    return false;
                }
                if (!time || Number.isNaN(time)) {
                    time = 3650 * 24 * 60 * 60;
                } // 10年
                const cacheExpireDate = new Date().getTime() - 1 + time * 1000;
                const cacheVal = {
                    val: stringVal,
                    exp: cacheExpireDate
                };
                localStorage.setItem(key, JSON.stringify(cacheVal)); // 存入缓存值
                return true;
                // console.log(key+":存入缓存，"+new Date(cacheExpireDate)+"到期");
            }
            catch (e) {
                return e;
            }
        },
        /** 获取缓存 */
        get(key) {
            try {
                if (!localStorage) {
                    return false;
                }
                const cacheVal = localStorage.getItem(key);
                const result = JSON.parse(cacheVal);
                const now = new Date().getTime() - 1;
                if (!result) {
                    return null;
                } // 缓存不存在
                if (now > result.exp) {
                    // 缓存过期
                    this.remove(key);
                    return "";
                }
                // console.log("get cache:"+key);
                return result.val;
            }
            catch (e) {
                this.remove(key);
                return null;
            }
        },
        /** 移除缓存，一般情况不手动调用，缓存过期自动调用 */
        remove(key) {
            if (!localStorage) {
                return;
            }
            localStorage.removeItem(key);
        },
        /** 清空所有缓存 */
        clear() {
            if (!localStorage) {
                return;
            }
            localStorage.clear();
        },
        /** 浏览器最大可用 */
        max() { },
        /** 当前最大可用 */
        last() { },
        /** 已用 */
        used() { }
    }
};
const catchUtil = {
    getLocalItem(key, needEmpireTime = false) {
        return needEmpireTime ? magusCloudCatch.Cache.get(key) : magusCloudCatch.Cache.getNoExpireTime(key);
    },
    setLocalItem(key, value, time = "") {
        time ? magusCloudCatch.Cache.put(key, value, time) : magusCloudCatch.Cache.putNoExpireTime(key, value);
    },
    removeLocalItem(key) {
        magusCloudCatch.Cache.remove(key);
    },
    clearAll() {
        magusCloudCatch.Cache.clear();
    },
    setSession(name, value) {
        if (window.opener && Object.getOwnPropertyNames(window.opener).length > 0) {
            window.opener.sessionStorage.setItem(name, value);
        }
        else {
            sessionStorage.setItem(name, value);
        }
    },
    getSession(name) {
        if (window.opener && Object.getOwnPropertyNames(window.opener).length > 0) {
            return window.opener.sessionStorage.getItem(name);
        }
        return sessionStorage.getItem(name);
    }
};

/* eslint-disable func-names */
// import {
//   Message
// } from 'element-ui';
// 创建axios实例
const service = axios.create({
    // baseURL: process.env.VUE_APP_BASE_API, // api的base_url
    timeout: 300000
});
// console.log(service);
// 设置cookie
const setCookie = function (cname, cvalue, exdays) {
    const d = new Date();
    d.setTime(d.getTime() + exdays * 24 * 60 * 60 * 1000);
    const expires = `expires=${d.toUTCString()}`;
    document.cookie = `${cname}=${cvalue}; ${expires}`;
};
// 清除cookie
const clearCookie = function (name) {
    setCookie(name, "", -1);
};
const pendingQueue = new Map();
const { CancelToken } = axios;
// 判断请求是否在队列中，如果在就对队列中的该请求执行取消操作
const judgePendingFunc = function (config) {
    if (pendingQueue.has(`${config.method}->${config.url}`)) {
        pendingQueue.get(`${config.method}->${config.url}`)(); // 注意这里的括号不要漏掉
    }
};
// 删除队列中对应已执行的请求
const removeResolvedFunc = function (config) {
    if (pendingQueue.has(`${config.method}->${config.url}`)) {
        pendingQueue.delete(`${config.method}->${config.url}`);
    }
};
const resetSetItem = function (key, newVal) {
    if (key === "taskChange") {
        // 创建一个StorageEvent事件
        const newStorageEvent = document.createEvent("StorageEvent");
        const storage = {
            setTaskItem(k, val) {
                sessionStorage.setItem(k, val);
                // 初始化创建的事件
                newStorageEvent.initStorageEvent("setTaskItem", false, false, k, null, val, undefined, null);
                // 派发对象
                window.dispatchEvent(newStorageEvent);
            }
        };
        return storage.setTaskItem(key, newVal);
    }
};
// 202 头部信息
let MlinkUrl = "";
// request拦截器
service.interceptors.request.use((config) => {
    // 请求发起之前先检验该请求是否在队列中，如果在就把队列中pending的请求cancel掉
    judgePendingFunc(config);
    // 将pending队列中的请求设置为当前
    config.cancelToken = new CancelToken((cb) => {
        pendingQueue.set(`${config.method}->${config.url}`, cb);
    });
    // eslint-disable-next-line no-underscore-dangle
    const _token = catchUtil.getLocalItem("token");
    if (_token) {
        config.headers.Authorization = `Bearer ${_token}`; // 让每个请求携带自定义token 请根据实际情况自行修改 // change by wen hao
        config.headers["Content-Type"] = "application/json";
    }
    if (config.headers["Mlink-URL"]) {
        MlinkUrl = config.headers["Mlink-URL"];
    }
    return config;
}, (error) => {
    // Do something with request error
    console.log(error); // for debug
    Promise.reject(error);
});
// respone拦截器
service.interceptors.response.use((response) => {
    removeResolvedFunc(response.config);
    const res = response.data;
    // 202 状态码拦截
    if (response.status === 202) {
        let mlinkData = {};
        const mlinkDataLocal = catchUtil.getLocalItem("mlinkData");
        if (mlinkDataLocal) {
            mlinkData = JSON.parse(mlinkDataLocal);
        }
        if (mlinkData[res.taskId]) {
            mlinkData[res.taskId] = Object.assign(mlinkData[res.taskId], res);
        }
        else {
            mlinkData[res.taskId] = res;
        }
        if (!document.getElementById(res.taskId) && !mlinkData[res.taskId].code) {
            mlinkData[res.taskId].elMessage = document.createElement("div");
            mlinkData[res.taskId].elMessage.id = res.taskId;
            const innerHtml = `
            <div class="el-dialog__wrapper" style="z-index: 2001;">
            <div role="dialog" aria-modal="true" aria-label="请稍后" class="el-dialog" style="margin-top: 15vh; width: 30%;">
              <div class="el-dialog__header" style="cursor: move;">
                <span class="el-dialog__title">请稍后</span>
              </div>
              <div class="el-dialog__body">
                <div class="dialog-content" style="padding: 15px;" id="dialog_${res.taskId}">
                </div>
              </div>
              <div class="el-dialog__footer">
                <span class="dialog-footer" id="dialog-footer-${res.taskId}">
                  
                </span>
              </div>
            </div>
          </div>
          <div class="v-modal" tabindex="0" style="z-index: 2000;"></div>
        `;
            mlinkData[res.taskId].elMessage.innerHTML = innerHtml;
            document.body.appendChild(mlinkData[res.taskId].elMessage);
        }
        if (document.getElementById(`dialog_${res.taskId}`) !== null) {
            const htmls = `
          <div style="display: ${res.progress ? "block" : "none"}; margin-bottom: 15px;" role="progressbar" aria-valuenow="${res.progress}" aria-valuemin="0" aria-valuemax="100" class="el-progress el-progress--line el-progress--text-inside">
            <div class="el-progress-bar">
              <div class="el-progress-bar__outer" style="height: 15px;">
                <div class="el-progress-bar__inner" style="width: ${res.progress}%;">
                  <div class="el-progress-bar__innerText">${res.progress}%</div>
                </div>
              </div>
            </div>
          </div>
          <div>${res.msg ? res.msg : "请稍后。。。。"}</div>
        `;
            document.getElementById(`dialog_${res.taskId}`).innerHTML = htmls;
        }
        if (document.getElementById(`dialog-footer-${res.taskId}`)) {
            const htmls = `
          <button type="button" id="button-continue-${res.taskId}" class="el-button el-button--default el-button--mini">
            <span>继续等待</span>
          </button>
          <button type="button" id="button-background-${res.taskId}" class="el-button el-button--primary el-button--mini">
            <span>后台等待</span>
          </button>
        `;
            document.getElementById(`dialog-footer-${res.taskId}`).innerHTML = htmls;
            document.getElementById(`button-background-${res.taskId}`).onclick = function () {
                if (document.getElementById(res.taskId)) {
                    document.getElementById(res.taskId).style.display = "none";
                }
                clearTimeout(mlinkData[res.taskId].timer);
            };
        }
        mlinkData[res.taskId].code = response.status;
        mlinkData[res.taskId].MlinkUrl = MlinkUrl;
        mlinkData[res.taskId].timer = setTimeout(() => {
            apiConfig$1.get(res.url, {}, { "Mlink-URL": MlinkUrl });
        }, 3000);
        catchUtil.setLocalItem("mlinkData", JSON.stringify(mlinkData));
        resetSetItem("taskChange", JSON.stringify(mlinkData));
    }
    // 成功状态并且有任务ID
    if (response.status === 200 && res.taskId) {
        const mlinkDataLocal = catchUtil.getLocalItem("mlinkData");
        if (mlinkDataLocal) {
            const mlinkData = JSON.parse(mlinkDataLocal);
            // if (document.getElementById(res.taskId)) {
            //   document.getElementById(res.taskId).remove();
            // }
            if (document.getElementById(`dialog_${res.taskId}`)) {
                const htmls = `
            <div style="display: ${res.progress ? "block" : "none"}" role="progressbar" aria-valuenow="${res.progress}" aria-valuemin="0" aria-valuemax="100" class="el-progress el-progress--line el-progress--text-inside">
              <div class="el-progress-bar">
                <div class="el-progress-bar__outer" style="height: 15px;">
                  <div class="el-progress-bar__inner" style="width: ${res.progress}%;">
                    <div class="el-progress-bar__innerText">${res.progress}%</div>
                  </div>
                </div>
              </div>
            </div>
            <div style="margin-top: 15px;" style="padding: 10px;">${res.msg ? res.msg : "请稍后。。。。"}</div>
          `;
                document.getElementById(`dialog_${res.taskId}`).innerHTML = htmls;
            }
            if (document.getElementById(`dialog-footer-${res.taskId}`)) {
                const htmls = `
            <button type="button" id="button-close-${res.taskId}" class="el-button el-button--default el-button--mini">
              <span>确定</span>
            </button>
          `;
                document.getElementById(`dialog-footer-${res.taskId}`).innerHTML = htmls;
                document.getElementById(`button-close-${res.taskId}`).onclick = function () {
                    if (document.getElementById(res.taskId)) {
                        document.getElementById(res.taskId).remove();
                    }
                };
            }
            if (document.getElementById(res.taskId) && document.getElementById(res.taskId).style.display === "none") {
                document.getElementById(res.taskId).remove();
            }
            if (mlinkData[res.taskId] && mlinkData[res.taskId].timer) {
                clearTimeout(mlinkData[res.taskId].timer);
                mlinkData[res.taskId] = res;
                mlinkData[res.taskId].code = response.status;
                mlinkData[res.taskId].MlinkUrl = MlinkUrl;
                // delete mlinkData[res.taskId]
                catchUtil.setLocalItem("mlinkData", JSON.stringify(mlinkData));
                resetSetItem("taskChange", JSON.stringify(mlinkData));
            }
        }
    }
    return res;
}, (error) => {
    if (error.response) {
        const elMessage = document.createElement("div");
        elMessage.className = "el-message el-message--error";
        elMessage.style = "z-index: 3000;";
        const elMessageInner = `<i class="el-message__icon el-icon-error"></i><p class="el-message__content">${error.response.data.error}</p>`;
        elMessage.innerHTML = elMessageInner;
        document.body.appendChild(elMessage);
        setTimeout(() => {
            elMessage.remove();
        }, 3000);
        if (error.response.status === 401) {
            setTimeout(() => {
                const url = window.location.origin;
                localStorage.clear();
                clearCookie("auth_token");
                window.open(url, "_self");
            }, 2000);
        }
    }
    return Promise.reject(error);
});

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-08 10:25:57
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-08 10:35:56
 * @FilePath: /jwb-vue3-ui/packages/api/http.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
function sendHttpRequest(requests) {
    return new Promise((resolve, reject) => {
        requests
            .then((response) => {
            resolve(response);
        })
            .catch((error) => {
            reject(error);
        });
    });
}
function post(url, param, headers, other) {
    return sendHttpRequest(service({
        url,
        method: "post",
        data: param || "",
        headers,
        ...other
    }));
}
function put(url, param, headers, other) {
    return sendHttpRequest(service({
        url,
        method: "put",
        data: param || "",
        headers,
        ...other
    }));
}
function deletes(url, param, headers, other) {
    return sendHttpRequest(service({
        url,
        method: "delete",
        data: param || "",
        headers,
        ...other
    }));
}
function get(url, param, headers, other) {
    // alert(BASE_API)
    // if(arguments[2] === void 0){ prefixUrl = BASE_API }
    const timestamp = new Date().getTime();
    const newUrl = url;
    let newUrl2 = "";
    if (!!window.ActiveXObject || "ActiveXObject" in window) {
        const newUrlArr = newUrl.split("?");
        if (newUrlArr.length > 1) {
            newUrl2 = `${newUrl}&ieStamp=${timestamp}`;
        }
        else {
            newUrl2 = `${newUrl}?ieStamp=${timestamp}`;
        }
    }
    else {
        newUrl2 = newUrl;
    }
    return sendHttpRequest(service({
        url: newUrl2,
        method: "get",
        params: param || "",
        headers,
        ...other
    }));
}

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-08 10:26:10
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-08 10:31:26
 * @FilePath: /jwb-vue3-ui/packages/api/config.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const apiConfig = {
    post(url, param = "", headers = {}, other = {}) {
        return post(url, param, headers, other);
    },
    get(url, param = "", headers = {}, other = {}) {
        return get(url, param, headers, other);
    },
    deletes(url, param = "", headers = {}, other = {}) {
        return deletes(url, param, headers, other);
    },
    put(url, param = "", headers = {}, other = {}) {
        return put(url, param, headers, other);
    }
};
var apiConfig$1 = apiConfig;

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-01 11:05:45
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-01 11:16:22
 * @FilePath: /jwb-vue3-ui/packages/utils/func.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const funcUtils = {
    /**
     * debounce 防抖
     * 设置方法最小触发间隔，例： 用于实时搜素
     * 简单理解：【延迟】触发
     * @param {*} func 触发函数
     * @param {*} outTime 最小间隔时长
     */
    debounce(func, outTime) {
        let timer = null;
        return () => {
            if (timer) {
                clearTimeout(timer);
            }
            timer = setTimeout(() => {
                // eslint-disable-next-line prefer-rest-params
                func.apply(this, arguments);
            }, outTime);
        };
    },
    /**
     * throttle 节流
     * 控制平均触发频率，高帧频控制 例： 用于滚动渲染
     * 简单理解：触发过快，希望【平均】触发
     * @param {*} func 触发函数
     * @param {*} outTime 触发间隔时长
     */
    throttle(func, outTime) {
        let canRun = true;
        return () => {
            if (!canRun)
                return;
            canRun = false;
            setTimeout(() => {
                // eslint-disable-next-line prefer-rest-params
                func.apply(this, arguments);
                canRun = true;
            }, outTime);
        };
    }
};

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-01 10:18:13
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-01 11:04:32
 * @FilePath: /jwb-vue3-ui/packages/utils/common.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
let location;
const commonUtils = {
    /**
     * @description: 深拷贝
     * @param {T} sourceData
     * @return {*}
     */
    deepCopy(sourceData) {
        if (Array.isArray(sourceData)) {
            return sourceData.map(item => commonUtils.deepCopy(item));
        }
        const obj = {};
        for (const key in sourceData) {
            if (typeof sourceData[key] === "object" && sourceData[key] !== null) {
                obj[key] = commonUtils.deepCopy(sourceData[key]);
            }
            else {
                obj[key] = sourceData[key];
            }
        }
        return obj;
    },
    /**
     * @description: 给某个元素加class
     * @param {*} element
     * @param {*} className
     * @return {*}
     */
    toggleClass(element, className) {
        if (!element || !className) {
            return;
        }
        element.className = className;
    },
    /**
     * @description: 获取链接参数
     * @param {*} variable
     * @return {*}
     */
    getQueryVariable(variable) {
        const query = window.location.search.substring(1);
        const vars = query.split("&");
        for (let i = 0; i < vars.length; i++) {
            const pair = vars[i].split("=");
            if (pair[0] === variable) {
                return pair[1];
            }
        }
        return false;
    },
    /**
     * @description: 获取链接中的所有参数
     * @param {*}
     * @return {*}
     */
    getUrlQueryParams(url = location.search) {
        const params = {};
        const keys = url.match(/([^?&]+)(?==)/g);
        const values = url.match(/(?<==)([^&]*)/g);
        for (const index in keys) {
            if (keys[index] !== null) {
                params[keys[index]] = values[index];
            }
        }
        return params;
    },
    /**
     * @description: 关闭tab页
     * @param {*}
     * @return {*}
     */
    closePage() {
        if (navigator.userAgent.indexOf("MSIE") > 0) {
            // close IE
            if (navigator.userAgent.indexOf("MSIE 6.0") > 0) {
                window.opener = null;
                window.close();
            }
            else {
                window.open("", "_top");
                if (window && window.top) {
                    window.top.close();
                }
            }
        }
        else {
            // close chrome;It is effective when it is only one.
            window.opener = null;
            window.open("", "_self");
            window.close();
        }
    },
    /**
     * 对象转url参数
     * @param {*} data,对象
     * @param {*} isPrefix,是否自动加上"?"
     */
    queryParams(data = {}, isPrefix = true, arrayFormat = "brackets") {
        const prefix = isPrefix ? "?" : "";
        const result = [];
        if (["indices", "brackets", "repeat", "comma"].indexOf(arrayFormat) === -1)
            arrayFormat = "brackets";
        for (const key in data) {
            if (data[key] !== null) {
                const value = data[key];
                // 如果值为数组，另行处理
                if (["", undefined, null].indexOf(value) === -1 && value.constructor === Array) {
                    // e.g. {ids: [1, 2, 3]}
                    switch (arrayFormat) {
                        case "indices":
                            // 结果: ids[0]=1&ids[1]=2&ids[2]=3
                            for (let i = 0; i < value.length; i++) {
                                result.push(`${key}[${i}]=${value[i]}`);
                            }
                            break;
                        case "brackets":
                            // 结果: ids[]=1&ids[]=2&ids[]=3
                            value.forEach(_value => {
                                result.push(`${key}[]=${_value}`);
                            });
                            break;
                        case "repeat":
                            // 结果: ids=1&ids=2&ids=3
                            value.forEach(_value => {
                                result.push(`${key}=${_value}`);
                            });
                            break;
                        case "comma": {
                            // 结果: ids=1,2,3
                            let commaStr = "";
                            value.forEach(_value => {
                                commaStr += (commaStr ? "," : "") + _value;
                            });
                            result.push(`${key}=${commaStr}`);
                            break;
                        }
                        default:
                            value.forEach(_value => {
                                result.push(`${key}[]=${_value}`);
                            });
                    }
                }
                else {
                    result.push(`${key}=${value}`);
                }
            }
        }
        return result.length ? prefix + result.join("&") : "";
    },
    /**
     * @description: 通过code获取字典信息
     * @param {*}
     * @return {*}
     */
    getDictionaryBycode(code) {
        const dictionary = localStorage.getItem("dictionary");
        let dictionaryData;
        if (dictionary) {
            const dictionaryCatch = JSON.parse(dictionary);
            const optionObj = dictionaryCatch.find((i) => i.code === code);
            if (optionObj) {
                dictionaryData = optionObj.items;
            }
            else {
                dictionaryData = [];
            }
        }
        else {
            dictionaryData = [];
        }
        return dictionaryData;
    },
    /**
     * @description: 查询字典项的值
     * @param {*} code 字典code
     * @param {*} value 通过哪个值查询
     * @param {*} showType 展示的类型
     * @param {*} findType 查询的类型
     * @return {*}
     */
    getDictLabel(code, value, showType = "name", findType = "value") {
        const dictionary = localStorage.getItem("dictionary");
        let labelValue = "";
        if (dictionary) {
            const dictionaryCatch = JSON.parse(dictionary);
            const optionObj = dictionaryCatch.find((i) => i.code === code);
            if (optionObj && optionObj.items) {
                const optionObjItem = optionObj.items;
                const showData = optionObjItem.find((i) => i[findType] === value);
                if (showData) {
                    labelValue = showData[showType];
                }
            }
        }
        return labelValue;
    },
    /**
     * @description: 通过参数code获取参数的值
     * @param {*} code
     * @return {*}
     */
    getParamsValue(code) {
        const parameter = localStorage.getItem("parameter");
        let value = "";
        if (parameter) {
            const parameterCatch = JSON.parse(parameter);
            const optionObj = parameterCatch.find((i) => i.code === code);
            if (optionObj && optionObj.value) {
                value = optionObj.value;
            }
        }
        return value;
    }
};

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-01 11:17:18
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-01 11:22:57
 * @FilePath: /jwb-vue3-ui/packages/utils/log.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const log = {};
/**
 * @description 返回这个样式的颜色值
 * @param {String} type 样式名称 [ primary | success | warning | danger | text ]
 */
function typeColor(type = "default") {
    let color = "";
    switch (type) {
        case "default":
            color = "#35495E";
            break;
        case "primary":
            color = "#3488ff";
            break;
        case "success":
            color = "#43B883";
            break;
        case "warning":
            color = "#e6a23c";
            break;
        case "danger":
            color = "#f56c6c";
            break;
    }
    return color;
}
/**
 * @description 打印一个 [ title | text ] 样式的信息
 * @param {String} title title text
 * @param {String} info info text
 * @param {String} type style
 */
log.capsule = (title, info, type = "primary") => {
    console.log(`%c ${title} %c ${info} %c`, "background:#35495E; padding: 1px; border-radius: 3px 0 0 3px; color: #fff;", `background:${typeColor(type)}; padding: 1px; border-radius: 0 3px 3px 0;  color: #fff;`, "background:transparent");
};
/**
 * @description 打印彩色文字
 */
log.colorful = (textArr) => {
    console.log(`%c${textArr.map((t) => t.text || "").join("%c")}`, ...textArr.map((t) => `color: ${typeColor(t.type)};`));
};
/**
 * @description 打印 default 样式的文字
 */
log.default = (text) => {
    log.colorful([
        {
            text
        }
    ]);
};
log.info = log.default;
/**
 * @description 打印 primary 样式的文字
 */
log.primary = (text) => {
    log.colorful([
        {
            text,
            type: "primary"
        }
    ]);
};
log.log = log.primary;
/**
 * @description 打印 success 样式的文字
 */
log.success = (text) => {
    log.colorful([
        {
            text,
            type: "success"
        }
    ]);
};
/**
 * @description 打印 warning 样式的文字
 */
log.warning = (text) => {
    log.colorful([
        {
            text,
            type: "warning"
        }
    ]);
};
log.warn = log.warning;
/**
 * @description 打印 danger 样式的文字
 */
log.danger = (text) => {
    log.colorful([
        {
            text,
            type: "danger"
        }
    ]);
};
log.error = log.danger;

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-01 11:23:31
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-01 11:23:31
 * @FilePath: /jwb-vue3-ui/packages/utils/validate.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const ptn = {
    ip() {
        return "^(?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))$";
    },
    // url  http://baidu.com或192.168.9.101或192.168.9.101:7070
    url_address() {
        return "^(((ht|f)tps?):\\/\\/[\\w\\-]+(\\.[\\w\\-]+)+)|((?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))(:(\\d+))?)$";
    },
    // domain ip或域名无http
    // todo 暂时无法验证192.168.9.1000非法ip
    domain() {
        return "^(([\\w\\-]+(\\.[\\w\\-]+)+)|((?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d))|((25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))))$";
    },
    data_source() {
        return "";
    },
    integer_num() {
        return "^-?\\d+$";
    },
    phone() {
        return /^(13[0-9]|14[01456879]|15[0-35-9]|16[2567]|17[0-8]|18[0-9]|19[0-35-9])\d{8}$/;
    },
    // 中英文数字
    cn_en_num(min = 0, max = 9999) {
        return `^[A-Za-z0-9\u4e00-\u9fa5 ]{${min},${max}}$`;
    },
    // 中英文数字点
    cn_en_num_point(min = 0, max = 9999) {
        return `^[A-Za-z0-9\u4e00-\u9fa5.{}]{${min},${max}}$`;
    },
    // 中英文数字冒号
    cn_en_num_colon(min = 0, max = 9999) {
        return `^[A-Za-z0-9\u4e00-\u9fa5:{}]{${min},${max}}$`;
    },
    // 正整数方式二,允许包含0，如10,20等
    positive_interger_two() {
        return "^[1-9][0-9{}]{0,10}$";
    },
    request_api(min = 0, max = 9999) {
        return `^(((https|http)?:\\/\\/)|(\\/))[^\\s]{${min},${max}}$`;
    },
    // IP + 端口号
    ip_and_port() {
        return "^(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\.(\\d{1,2}|1\\d\\d|2[0-4]\\d|25[0-5])\\:([0-9]|[1-9]\\d{1,3}|[1-5]\\d{4}|6[0-5]{2}[0-3][0-5])$";
    },
    // 中文数字
    cn_num(min = 0, max = 9999) {
        return `^[0-9\u4e00-\u9fa5]{${min},${max}}$`;
    },
    // 英文数字
    en_num(min = 0, max = 9999) {
        return `^[A-Za-z0-9 ]{${min},${max}}$`;
    },
    // 英文数字反斜杠
    en_num_backslash(min = 0, max = 9999) {
        return `^[/a-zA-Z0-9{}}]{${min},${max}}$`;
    },
    // 英文数字下划线
    en_num_line(min = 0, max = 9999) {
        return `^[_a-zA-Z0-9 ]{${min},${max}}$`;
    },
    // 英文下划线
    en_line(min = 0, max = 9999) {
        return `^[_a-zA-Z ]{${min},${max}}$`;
    },
    // 数字、字母、下划线、小数点
    cn_en_num_underline(min = 0, max = 9999) {
        return `^[_.A-Za-z0-9\u4e00-\u9fa5 ]{${min},${max}}$`;
    },
    // 英文数字点
    en_num_point(min = 0, max = 9999) {
        // eslint-disable-next-line no-useless-concat
        return `${"^[a-zA-Z0-9." + "" + " ]{"}${min},${max}}$`;
    },
    // 中文、英文、数字及下划线
    cn_en_num_line(min = 0, max = 9999) {
        return `^[\u4e00-\u9fa5_a-zA-Z0-9 ]{${min},${max}}$`;
    },
    // 正整数
    positive_interger() {
        return "^[1-9]+\\d*$";
    },
    // 中文
    cn(min = 0, max = 9999) {
        return `^[\u4e00-\u9fa5]{${min},${max}}$`;
    },
    // 英文
    en(min = 0, max = 9999) {
        return `^[A-Za-z ]{${min},${max}}$`;
    },
    // 中文、英文、数字及中划线
    cn_en_num_cen_line(min = 0, max = 9999) {
        return `^[A-Za-z0-9-\u4e00-\u9fa5 ]{${min},${max}}$`;
    },
    // 英文中文
    en_cn(min = 0, max = 9999) {
        return `^[A-Za-z\u4e00-\u9fa5]{${min},${max}}$`;
    },
    // 英文中文分号
    en_cn_semicolon(min = 0, max = 9999) {
        return `^[;A-Za-z\u4e00-\u9fa5]{${min},${max}}$`;
    },
    // 通配限制长度
    all_match(min = 0, max = 9999) {
        return `^[\\s\\S]{${min},${max}}$`;
    },
    // 英文,点，中划线和下划线
    en_dot_line(min = 0, max = 9999) {
        return `^[-A-Za-z._]{${min},${max}}$`;
    },
    // 数字
    number(min = 0, max = 9999) {
        return `^[0-9]{${min},${max}}$`;
    },
    // 英文和常用字符
    en_common_character(min = 0, max = 9999) {
        return `^[^0-9^\u4e00-\u9fa5^ ]{${min},${max}}$`;
    },
    // 不带空白字符英文数字
    pure_en_num(min = 0, max = 9999) {
        return `^[A-Za-z0-9]{${min},${max}}$`;
    },
    email() {
        return "^[a-zA-Z0-9.-_\u4e00-\u9fa5]+@[a-zA-Z0-9-_]+(\\.[A-Za-z0-9-_]+)+$";
    }
};

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-08 10:22:17
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-12 11:06:59
 * @FilePath: /jwb-vue3-ui/packages/lang/global_zhCN.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const zhCN = {
    global: {
        username: "用户名",
        password: "密码",
        username_input: "请输入用户名！",
        password_input: "请输入密码！",
        rememberMe: "记住用户",
        forgetPwd: "忘记密码",
        login: "登录",
        loginBottomTip: "Copyright ©Shanghai Magus Technology Co. Ltd All rights reserved",
        chinese: "中文",
        en: "英文",
        default: "默认",
        green: "绿色",
        red: "红色",
        systemManagerLogin: "管理系统登录",
        systemName: "云边一体化平台",
        magustek: "麦杰科技",
        more: "更多",
        user: "用戶",
        userInfo: "个人中心",
        taskList: "任务列表",
        completeUserInfo: "修改信息",
        EditPassword: "修改密码",
        oldPassword: "原密码",
        newPassword: "新密码",
        checkNewPassword: "确认新密码",
        newPasswordDiff: "两次新密码不一样",
        editPasswordSuccess: "修改密码成功",
        needOldPwd: "请输入旧密码",
        needNewPwd: "请输入新密码",
        needNewPwd2: "请确认新密码",
        userInfoDialog: {
            username: "登录用户名:",
            orgCode: "数据授权信息:",
            mobile: "手机号码:",
            email: "邮箱地址:",
            sysAdmin: "系统超级管理员:",
            admin: "管理员:",
            type: "用户类别:",
            descs: "备注:"
        },
        Exit: "退出",
        home: "企业主页",
        allOrgCode: "全部",
        language: "语言",
        theme: "主题",
        showLiftMenu: "显示菜单",
        hiddenLiftMenu: "隐藏菜单",
        openAllScreen: "全屏",
        closeAllScreen: "退出全屏",
        exportHthml: "导出HTML",
        importExcel: "导入Excel",
        chooseFile: "选择文件",
        tip: {
            excel_tip: "只能上传xlsx文件"
        },
        userLogin: {
            error: "账户名与密码不匹配，请重新输入",
            userInfoError: "获取用户信息失败",
            orgCodeInfoError: "获取组织机构信息失败",
            dictInfoError: "获取数据字典信息失败",
            menuInfoError: "获取菜单信息失败",
            usernameEmpty: "用户名不能为空",
            passwordEmpty: "密码不能为空"
        },
        action: {
            add: "新增",
            edit: "编辑",
            delete: "删除",
            search: "查询",
            confirm: "确定",
            cancel: "取消",
            save: "保存",
            back: "返回",
            backHome: "返回首页",
            packup: "收起",
            unfold: "展开"
        },
        field: {
            No: "序号"
        },
        text: {
            choose: "请选择",
            success: "操作成功",
            error: "操作失败",
            delete: "是否确认删除",
            notice: "提示",
            total: "共",
            itemPage: "条记录，每页",
            currentPage: "条，当前",
            page: "页"
        },
        request: {
            errMsg_400: "400错误: 请求失败!",
            errMsg_401: "401错误: 没有权限!",
            errMsg_403: "403错误: 服务器拒绝执行此请求!",
            errMsg_404: "404错误: 没有找到资源!",
            errMsg_500: "500错误: 系统错误!",
            errMsg_504: "504错误: 网络请求超时！",
            errMsg_999: "会话过期！"
        },
        dialogTitle: {
            chooseIcon: "选择图标"
        }
    }
};

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-08 10:17:51
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-12 11:07:14
 * @FilePath: /jwb-vue3-ui/packages/lang/global_en.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
const en = {
    global: {
        username: "Username",
        password: "Password",
        username_input: "Please input username!",
        password_input: "Please input password!",
        rememberMe: "Remember Me",
        forgetPwd: "Forget Password",
        login: "Login",
        loginBottomTip: "Copyright ©Shanghai Magus Technology Co. Ltd All rights reserved",
        chinese: "Chinese",
        en: "English",
        default: "Default",
        green: "Green",
        red: "Red",
        systemManagerLogin: "System Manager Login",
        systemName: "Cloud edge integration platform",
        magustek: "magustek",
        more: "More",
        user: "User",
        userInfo: "UserInfo",
        taskList: "The task list",
        completeUserInfo: "CompleteInfo",
        EditPassword: "EditPassword",
        oldPassword: "OldPassword",
        newPassword: "NewPassword",
        checkNewPassword: "Confirm password",
        newPasswordDiff: "Two new passwords are different!",
        editPasswordSuccess: "Password has been updated",
        needOldPwd: "Place input old password",
        needNewPwd: "Place input new password",
        needNewPwd2: "Place confirm new password",
        userInfoDialog: {
            username: "Username",
            orgCode: "OrgCode",
            mobile: "Mobile",
            email: "Email",
            sysAdmin: "SysAdmin",
            admin: "Admin",
            type: "Type",
            descs: "Remark"
        },
        Exit: "Exit",
        home: "Operations center",
        allOrgCode: "All",
        language: "Language",
        theme: "Theme",
        showLiftMenu: "Display menu",
        hiddenLiftMenu: "Hidden menu",
        openAllScreen: "Full Screen",
        closeAllScreen: "Exit Full Screen",
        exportHthml: "Export HTML",
        importExcel: "Import Excel",
        chooseFile: "Select the file",
        tip: {
            excel_tip: "Only XLSX files can be uploaded"
        },
        userLogin: {
            error: "The account name and password do not match, please re-enter",
            userInfoError: "Failed to get user information",
            orgCodeInfoError: "Failed to get organization information",
            dictInfoError: "Failed to get data dictionary information",
            menuInfoError: "Failed to get menu information",
            usernameEmpty: "The user name cannot be empty",
            passwordEmpty: "The password cannot be empty"
        },
        action: {
            add: "add",
            edit: "edit",
            delete: "delete",
            search: "search",
            confirm: "confirm",
            cancel: "cancel",
            save: "save",
            back: "back",
            backHome: "back home",
            packup: "Pack Up",
            unfold: "Unfold"
        },
        field: {
            No: "No"
        },
        text: {
            choose: "choose",
            success: "success",
            error: "error",
            delete: "delete",
            notice: "notice",
            total: "total",
            itemPage: "items，",
            currentPage: "items/page，",
            page: "page"
        },
        request: {
            errMsg_400: "400 error: Request failed!",
            errMsg_401: "401 error: Permission denied!",
            errMsg_403: "403 error: The server refused to execute this request!",
            errMsg_404: "404 error: No resources found!",
            errMsg_500: "500 error: system error!",
            errMsg_504: "504 error: Network request timeout!",
            errMsg_999: "Session timeout!"
        },
        dialogTitle: {
            chooseIcon: "Choose the icon"
        }
    }
};

/*
 * @Description:
 * @Version: 1.0
 * @Author: wenbin
 * @Date: 2021-11-08 10:22:58
 * @LastEditors: wenbin
 * @LastEditTime: 2021-11-08 10:22:59
 * @FilePath: /jwb-vue3-ui/packages/lang/index.ts
 * Copyright (C) 2021 wenbin. All rights reserved.
 */
var lang = {
    zhCN,
    en
};

var id = "2441109";
var name = "云平台";
var font_family = "magusdip-iconfont";
var css_prefix_text = "magusdip";
var description = "magus云平台相关";
var glyphs = [
	{
		icon_id: "29120858",
		name: "全部展开",
		font_class: "quanbuzhankai",
		unicode: "e6ae",
		unicode_decimal: 59054
	},
	{
		icon_id: "29120682",
		name: "全部收起",
		font_class: "quanbushouqi",
		unicode: "e6af",
		unicode_decimal: 59055
	},
	{
		icon_id: "28629598",
		name: "关闭声音",
		font_class: "guanbishengyin",
		unicode: "e6ab",
		unicode_decimal: 59051
	},
	{
		icon_id: "28629599",
		name: "声音",
		font_class: "shengyin",
		unicode: "e6ac",
		unicode_decimal: 59052
	},
	{
		icon_id: "421115",
		name: "组织部门",
		font_class: "zuzhibumen",
		unicode: "e6a5",
		unicode_decimal: 59045
	},
	{
		icon_id: "6901606",
		name: "公司",
		font_class: "gongsi",
		unicode: "e6a6",
		unicode_decimal: 59046
	},
	{
		icon_id: "7338876",
		name: "部门用能",
		font_class: "bumenyongneng",
		unicode: "e6a7",
		unicode_decimal: 59047
	},
	{
		icon_id: "9162734",
		name: "岗位",
		font_class: "gangwei",
		unicode: "e6aa",
		unicode_decimal: 59050
	},
	{
		icon_id: "15829867",
		name: "机构",
		font_class: "jigou",
		unicode: "e7a0",
		unicode_decimal: 59296
	},
	{
		icon_id: "18164896",
		name: "组织,合作,协作,人员,分支,关联人员",
		font_class: "teamwork",
		unicode: "e870",
		unicode_decimal: 59504
	},
	{
		icon_id: "26956431",
		name: "启动",
		font_class: "a-ziyuan56",
		unicode: "e6a0",
		unicode_decimal: 59040
	},
	{
		icon_id: "26956398",
		name: "复制",
		font_class: "fuzhi1",
		unicode: "e69d",
		unicode_decimal: 59037
	},
	{
		icon_id: "26956399",
		name: "启用",
		font_class: "qiyong",
		unicode: "e69e",
		unicode_decimal: 59038
	},
	{
		icon_id: "26956400",
		name: "查看",
		font_class: "chakan1",
		unicode: "e69f",
		unicode_decimal: 59039
	},
	{
		icon_id: "26956402",
		name: "停止",
		font_class: "tingzhi",
		unicode: "e6a2",
		unicode_decimal: 59042
	},
	{
		icon_id: "26956403",
		name: "设置值",
		font_class: "shezhizhi",
		unicode: "e6a3",
		unicode_decimal: 59043
	},
	{
		icon_id: "26956404",
		name: "禁用",
		font_class: "jinyong",
		unicode: "e6a4",
		unicode_decimal: 59044
	},
	{
		icon_id: "26830328",
		name: "资源 51",
		font_class: "a-ziyuan51",
		unicode: "e69c",
		unicode_decimal: 59036
	},
	{
		icon_id: "26830325",
		name: "资源 49",
		font_class: "a-ziyuan49",
		unicode: "e699",
		unicode_decimal: 59033
	},
	{
		icon_id: "26830326",
		name: "资源 50",
		font_class: "a-ziyuan50",
		unicode: "e69a",
		unicode_decimal: 59034
	},
	{
		icon_id: "26830327",
		name: "资源 48",
		font_class: "a-ziyuan48",
		unicode: "e69b",
		unicode_decimal: 59035
	},
	{
		icon_id: "7720075",
		name: "消息",
		font_class: "xiaoxi",
		unicode: "e698",
		unicode_decimal: 59032
	},
	{
		icon_id: "6483174",
		name: "添加服务",
		font_class: "tianjiafuwu",
		unicode: "e697",
		unicode_decimal: 59031
	},
	{
		icon_id: "457078",
		name: "测点能耗数据",
		font_class: "znbb2",
		unicode: "e695",
		unicode_decimal: 59029
	},
	{
		icon_id: "13269452",
		name: " 互联网",
		font_class: "hulianwang",
		unicode: "e717",
		unicode_decimal: 59159
	},
	{
		icon_id: "20186688",
		name: "电源",
		font_class: "dianyuan",
		unicode: "e696",
		unicode_decimal: 59030
	},
	{
		icon_id: "23244243",
		name: "接口",
		font_class: "jiekou",
		unicode: "e6a8",
		unicode_decimal: 59048
	},
	{
		icon_id: "23789923",
		name: "踩",
		font_class: "cai1",
		unicode: "e692",
		unicode_decimal: 59026
	},
	{
		icon_id: "23788422",
		name: "点赞",
		font_class: "dianzan",
		unicode: "e691",
		unicode_decimal: 59025
	},
	{
		icon_id: "2002923",
		name: "暂无数据",
		font_class: "zanwushuju",
		unicode: "e690",
		unicode_decimal: 59024
	},
	{
		icon_id: "23339366",
		name: "踩",
		font_class: "cai",
		unicode: "e68e",
		unicode_decimal: 59022
	},
	{
		icon_id: "7401286",
		name: "分组管理",
		font_class: "group",
		unicode: "e684",
		unicode_decimal: 59012
	},
	{
		icon_id: "21435853",
		name: "协议",
		font_class: "xieyi",
		unicode: "e6ad",
		unicode_decimal: 59053
	},
	{
		icon_id: "5103328",
		name: "版本",
		font_class: "banben",
		unicode: "e682",
		unicode_decimal: 59010
	},
	{
		icon_id: "11696751",
		name: "支持平台",
		font_class: "zhichipingtai",
		unicode: "e683",
		unicode_decimal: 59011
	},
	{
		icon_id: "21822285",
		name: "装备型号",
		font_class: "zhuangbeixinghao",
		unicode: "e685",
		unicode_decimal: 59013
	},
	{
		icon_id: "11583295",
		name: "其他应用2",
		font_class: "xingzhuangjiehe",
		unicode: "e686",
		unicode_decimal: 59014
	},
	{
		icon_id: "11756982",
		name: "下单",
		font_class: "xiadan-copy",
		unicode: "e687",
		unicode_decimal: 59015
	},
	{
		icon_id: "12713504",
		name: "点赞",
		font_class: "zan",
		unicode: "e68c",
		unicode_decimal: 59020
	},
	{
		icon_id: "17907925",
		name: "应用",
		font_class: "chanpin1",
		unicode: "e68d",
		unicode_decimal: 59021
	},
	{
		icon_id: "19312297",
		name: "型号",
		font_class: "xinghao",
		unicode: "e68f",
		unicode_decimal: 59023
	},
	{
		icon_id: "21533128",
		name: "厂家",
		font_class: "changjia",
		unicode: "e706",
		unicode_decimal: 59142
	},
	{
		icon_id: "3404230",
		name: "镜像",
		font_class: "jingxiang",
		unicode: "e6da",
		unicode_decimal: 59098
	},
	{
		icon_id: "6828762",
		name: "信号",
		font_class: "xinhao",
		unicode: "e64d",
		unicode_decimal: 58957
	},
	{
		icon_id: "6932392",
		name: "无线呼叫",
		font_class: "wuxianhujiao",
		unicode: "e67a",
		unicode_decimal: 59002
	},
	{
		icon_id: "11685295",
		name: "密码重置",
		font_class: "mimazhongzhi",
		unicode: "e67b",
		unicode_decimal: 59003
	},
	{
		icon_id: "13043469",
		name: "WIFI 我fi",
		font_class: "WIFIwofi",
		unicode: "e67c",
		unicode_decimal: 59004
	},
	{
		icon_id: "14409297",
		name: "预览",
		font_class: "chakan-3",
		unicode: "e67d",
		unicode_decimal: 59005
	},
	{
		icon_id: "14646393",
		name: "cpu",
		font_class: "icon-GPU-dashboard",
		unicode: "e67e",
		unicode_decimal: 59006
	},
	{
		icon_id: "15884105",
		name: "串口服务器",
		font_class: "chuankoufuwuqi",
		unicode: "e67f",
		unicode_decimal: 59007
	},
	{
		icon_id: "17971891",
		name: "热点",
		font_class: "redian",
		unicode: "e6a9",
		unicode_decimal: 59049
	},
	{
		icon_id: "19220180",
		name: "内存",
		font_class: "neicun",
		unicode: "e693",
		unicode_decimal: 59027
	},
	{
		icon_id: "20893813",
		name: "应用",
		font_class: "yingyong",
		unicode: "e680",
		unicode_decimal: 59008
	},
	{
		icon_id: "21485667",
		name: "日历",
		font_class: "rili",
		unicode: "e681",
		unicode_decimal: 59009
	},
	{
		icon_id: "1614600",
		name: "重置密码",
		font_class: "zhongzhimima",
		unicode: "e65b",
		unicode_decimal: 58971
	},
	{
		icon_id: "4822133",
		name: "dns",
		font_class: "dns",
		unicode: "e65d",
		unicode_decimal: 58973
	},
	{
		icon_id: "4978671",
		name: "网络",
		font_class: "wangluo",
		unicode: "e666",
		unicode_decimal: 58982
	},
	{
		icon_id: "6111398",
		name: "云平台",
		font_class: "yunpingtai",
		unicode: "e665",
		unicode_decimal: 58981
	},
	{
		icon_id: "8262659",
		name: "授权管理",
		font_class: "shouquanguanli",
		unicode: "e667",
		unicode_decimal: 58983
	},
	{
		icon_id: "8638102",
		name: "上传",
		font_class: "shangchuan1",
		unicode: "e668",
		unicode_decimal: 58984
	},
	{
		icon_id: "8818257",
		name: "马蜂窝",
		font_class: "mafengwo",
		unicode: "e669",
		unicode_decimal: 58985
	},
	{
		icon_id: "9199655",
		name: "NAT网关",
		font_class: "NATwangguan",
		unicode: "e66a",
		unicode_decimal: 58986
	},
	{
		icon_id: "9401263",
		name: "网桥",
		font_class: "wangqiao",
		unicode: "e66b",
		unicode_decimal: 58987
	},
	{
		icon_id: "9529032",
		name: "授权",
		font_class: "shouquan",
		unicode: "e66c",
		unicode_decimal: 58988
	},
	{
		icon_id: "9646971",
		name: "dns",
		font_class: "dns1",
		unicode: "e66f",
		unicode_decimal: 58991
	},
	{
		icon_id: "10593819",
		name: "网络安全,盾牌_jurassic",
		font_class: "jurassic_safe",
		unicode: "e6a1",
		unicode_decimal: 59041
	},
	{
		icon_id: "11486357",
		name: "蜂窝",
		font_class: "fengwo",
		unicode: "e672",
		unicode_decimal: 58994
	},
	{
		icon_id: "11666983",
		name: "策略",
		font_class: "celve",
		unicode: "e673",
		unicode_decimal: 58995
	},
	{
		icon_id: "11996606",
		name: "无数据",
		font_class: "wushuju",
		unicode: "e674",
		unicode_decimal: 58996
	},
	{
		icon_id: "12544680",
		name: "规则",
		font_class: "8637e972",
		unicode: "e675",
		unicode_decimal: 58997
	},
	{
		icon_id: "12988431",
		name: "网络安全",
		font_class: "wangluoanquan",
		unicode: "e676",
		unicode_decimal: 58998
	},
	{
		icon_id: "13010342",
		name: "恢复",
		font_class: "ziyuan",
		unicode: "e6b6",
		unicode_decimal: 59062
	},
	{
		icon_id: "13882792",
		name: "诊断",
		font_class: "zhenduan1",
		unicode: "e76e",
		unicode_decimal: 59246
	},
	{
		icon_id: "14676003",
		name: "D-工作通知-系统升级",
		font_class: "D-gongzuotongzhi-xitongshengji",
		unicode: "e677",
		unicode_decimal: 58999
	},
	{
		icon_id: "15801323",
		name: "无数据",
		font_class: "wushuju1",
		unicode: "e678",
		unicode_decimal: 59000
	},
	{
		icon_id: "19209564",
		name: "边缘计算",
		font_class: "bianyuanjisuan",
		unicode: "e679",
		unicode_decimal: 59001
	},
	{
		icon_id: "21309264",
		name: "重启",
		font_class: "zhongqi",
		unicode: "ea2f",
		unicode_decimal: 59951
	},
	{
		icon_id: "20614005",
		name: "导出",
		font_class: "daochu",
		unicode: "e7f4",
		unicode_decimal: 59380
	},
	{
		icon_id: "2567910",
		name: "采集",
		font_class: "caiji2",
		unicode: "e662",
		unicode_decimal: 58978
	},
	{
		icon_id: "6176349",
		name: "系统管理",
		font_class: "xitongguanli",
		unicode: "e663",
		unicode_decimal: 58979
	},
	{
		icon_id: "17400069",
		name: "模板",
		font_class: "moban",
		unicode: "e664",
		unicode_decimal: 58980
	},
	{
		icon_id: "19868283",
		name: "连接",
		font_class: "lianjie2",
		unicode: "e877",
		unicode_decimal: 59511
	},
	{
		icon_id: "1609966",
		name: "列表",
		font_class: "liebiao",
		unicode: "e660",
		unicode_decimal: 58976
	},
	{
		icon_id: "15033741",
		name: "场站",
		font_class: "changzhan",
		unicode: "e661",
		unicode_decimal: 58977
	},
	{
		icon_id: "7848729",
		name: "集电线路",
		font_class: "jidianxianlu",
		unicode: "e65e",
		unicode_decimal: 58974
	},
	{
		icon_id: "9245105",
		name: "指标",
		font_class: "zhibiao",
		unicode: "e65f",
		unicode_decimal: 58975
	},
	{
		icon_id: "20041135",
		name: "工期-2",
		font_class: "gongqi-2",
		unicode: "e6e2",
		unicode_decimal: 59106
	},
	{
		icon_id: "11031774",
		name: "断开连接",
		font_class: "weilianjie",
		unicode: "e6f9",
		unicode_decimal: 59129
	},
	{
		icon_id: "12157794",
		name: "连接",
		font_class: "lianjie",
		unicode: "e658",
		unicode_decimal: 58968
	},
	{
		icon_id: "13814756",
		name: "连接",
		font_class: "lianjie1",
		unicode: "e659",
		unicode_decimal: 58969
	},
	{
		icon_id: "16840393",
		name: "断开",
		font_class: "duankai",
		unicode: "e718",
		unicode_decimal: 59160
	},
	{
		icon_id: "18633943",
		name: "断开",
		font_class: "duankai1",
		unicode: "e65a",
		unicode_decimal: 58970
	},
	{
		icon_id: "4734043",
		name: "重设密码",
		font_class: "zhongshemima",
		unicode: "e657",
		unicode_decimal: 58967
	},
	{
		icon_id: "19660053",
		name: "批量",
		font_class: "piliang",
		unicode: "e652",
		unicode_decimal: 58962
	},
	{
		icon_id: "12597164",
		name: "32-停机",
		font_class: "-tingji",
		unicode: "e736",
		unicode_decimal: 59190
	},
	{
		icon_id: "13809353",
		name: "恢复",
		font_class: "huifu",
		unicode: "eaf7",
		unicode_decimal: 60151
	},
	{
		icon_id: "3466492",
		name: "报警",
		font_class: "baojing1",
		unicode: "e6b9",
		unicode_decimal: 59065
	},
	{
		icon_id: "7714065",
		name: "操作日志",
		font_class: "caozuorizhi",
		unicode: "e72f",
		unicode_decimal: 59183
	},
	{
		icon_id: "8262666",
		name: "用户日志",
		font_class: "yonghurizhi",
		unicode: "e651",
		unicode_decimal: 58961
	},
	{
		icon_id: "9016702",
		name: "曲线",
		font_class: "quxian",
		unicode: "e654",
		unicode_decimal: 58964
	},
	{
		icon_id: "13496702",
		name: "风机",
		font_class: "fengji3",
		unicode: "e689",
		unicode_decimal: 59017
	},
	{
		icon_id: "19413251",
		name: "故障",
		font_class: "guzhang",
		unicode: "e655",
		unicode_decimal: 58965
	},
	{
		icon_id: "6330654",
		name: "历史查询",
		font_class: "lishichaxun",
		unicode: "e6ba",
		unicode_decimal: 59066
	},
	{
		icon_id: "1100542",
		name: "故障",
		font_class: "302",
		unicode: "e64f",
		unicode_decimal: 58959
	},
	{
		icon_id: "9444709",
		name: "能量",
		font_class: "nengliangbeifen",
		unicode: "e68b",
		unicode_decimal: 59019
	},
	{
		icon_id: "18711953",
		name: "风机",
		font_class: "fengji2",
		unicode: "e650",
		unicode_decimal: 58960
	},
	{
		icon_id: "16019771",
		name: "历史查询2",
		font_class: "lishichaxun2",
		unicode: "e7ac",
		unicode_decimal: 59308
	},
	{
		icon_id: "21055428",
		name: "对比 (2)",
		font_class: "duibi2",
		unicode: "e653",
		unicode_decimal: 58963
	},
	{
		icon_id: "7559866",
		name: "取消",
		font_class: "quxiao",
		unicode: "e64b",
		unicode_decimal: 58955
	},
	{
		icon_id: "13996823",
		name: "风机控制",
		font_class: "fengjikongzhi",
		unicode: "e688",
		unicode_decimal: 59016
	},
	{
		icon_id: "16368255",
		name: "勾选2",
		font_class: "gouxuan2",
		unicode: "e64c",
		unicode_decimal: 58956
	},
	{
		icon_id: "21586639",
		name: "风机",
		font_class: "fengji1",
		unicode: "e64e",
		unicode_decimal: 58958
	},
	{
		icon_id: "3640184",
		name: "基本信息",
		font_class: "jibenxinxi",
		unicode: "e647",
		unicode_decimal: 58951
	},
	{
		icon_id: "11043871",
		name: "控制",
		font_class: "kongzhi",
		unicode: "e648",
		unicode_decimal: 58952
	},
	{
		icon_id: "11173511",
		name: "向下",
		font_class: "down-fill1-xs",
		unicode: "e649",
		unicode_decimal: 58953
	},
	{
		icon_id: "16400089",
		name: "gw_监视器墙_0",
		font_class: "gw_jianshiqiqiang_0",
		unicode: "e872",
		unicode_decimal: 59506
	},
	{
		icon_id: "18759455",
		name: "排序",
		font_class: "sort",
		unicode: "e64a",
		unicode_decimal: 58954
	},
	{
		icon_id: "21545095",
		name: "停用红调",
		font_class: "tingyonghongtiao",
		unicode: "e646",
		unicode_decimal: 58950
	},
	{
		icon_id: "21545002",
		name: "停用灰调",
		font_class: "tingyonghuitiao",
		unicode: "e645",
		unicode_decimal: 58949
	},
	{
		icon_id: "21544330",
		name: "实时计算3",
		font_class: "shishijisuan3",
		unicode: "e643",
		unicode_decimal: 58947
	},
	{
		icon_id: "21543884",
		name: "上传111",
		font_class: "shangchuan111",
		unicode: "e641",
		unicode_decimal: 58945
	},
	{
		icon_id: "21543638",
		name: "采集绿色",
		font_class: "caijilvse",
		unicode: "e640",
		unicode_decimal: 58944
	},
	{
		icon_id: "21543430",
		name: "网关",
		font_class: "wangguan",
		unicode: "e63f",
		unicode_decimal: 58943
	},
	{
		icon_id: "21543128",
		name: "锅炉2",
		font_class: "guolu2",
		unicode: "e63e",
		unicode_decimal: 58942
	},
	{
		icon_id: "21542161",
		name: "系统 (2)",
		font_class: "xitong2",
		unicode: "e63c",
		unicode_decimal: 58940
	},
	{
		icon_id: "21541819",
		name: "机组111",
		font_class: "jizu111",
		unicode: "e63b",
		unicode_decimal: 58939
	},
	{
		icon_id: "21541669",
		name: "电厂 (2)",
		font_class: "dianchang2",
		unicode: "e63a",
		unicode_decimal: 58938
	},
	{
		icon_id: "21541478",
		name: "设备 (2)",
		font_class: "shebei2",
		unicode: "e639",
		unicode_decimal: 58937
	},
	{
		icon_id: "21541319",
		name: "其他设备",
		font_class: "qitashebei",
		unicode: "e615",
		unicode_decimal: 58901
	},
	{
		icon_id: "21534914",
		name: "上传2",
		font_class: "shangchuan2",
		unicode: "e60f",
		unicode_decimal: 58895
	},
	{
		icon_id: "21534788",
		name: "驱动管理",
		font_class: "qudongguanli",
		unicode: "e603",
		unicode_decimal: 58883
	},
	{
		icon_id: "21534789",
		name: "启动",
		font_class: "qidong",
		unicode: "e604",
		unicode_decimal: 58884
	},
	{
		icon_id: "21534790",
		name: "平台",
		font_class: "pingtai",
		unicode: "e605",
		unicode_decimal: 58885
	},
	{
		icon_id: "21534791",
		name: "配置",
		font_class: "peizhi",
		unicode: "e609",
		unicode_decimal: 58889
	},
	{
		icon_id: "21534792",
		name: "停用1",
		font_class: "tingyong1",
		unicode: "e60a",
		unicode_decimal: 58890
	},
	{
		icon_id: "21534793",
		name: "任务未下发",
		font_class: "renwuweixiafa",
		unicode: "e60b",
		unicode_decimal: 58891
	},
	{
		icon_id: "21534794",
		name: "删除",
		font_class: "shanchu",
		unicode: "e60c",
		unicode_decimal: 58892
	},
	{
		icon_id: "21534796",
		name: "系统设置",
		font_class: "xitongshezhi",
		unicode: "e610",
		unicode_decimal: 58896
	},
	{
		icon_id: "21534797",
		name: "设备",
		font_class: "shebei",
		unicode: "e612",
		unicode_decimal: 58898
	},
	{
		icon_id: "21534798",
		name: "下载失败",
		font_class: "xiazaishibai",
		unicode: "e613",
		unicode_decimal: 58899
	},
	{
		icon_id: "21534799",
		name: "系统设置1",
		font_class: "xitongshezhi1",
		unicode: "e614",
		unicode_decimal: 58900
	},
	{
		icon_id: "21534801",
		name: "系统日志",
		font_class: "xitongrizhi",
		unicode: "e616",
		unicode_decimal: 58902
	},
	{
		icon_id: "21534802",
		name: "采集",
		font_class: "caiji",
		unicode: "e617",
		unicode_decimal: 58903
	},
	{
		icon_id: "21534803",
		name: "用户",
		font_class: "yonghu",
		unicode: "e619",
		unicode_decimal: 58905
	},
	{
		icon_id: "21534804",
		name: "导入",
		font_class: "daoru",
		unicode: "e61a",
		unicode_decimal: 58906
	},
	{
		icon_id: "21534805",
		name: "编辑",
		font_class: "bianji",
		unicode: "e61c",
		unicode_decimal: 58908
	},
	{
		icon_id: "21534806",
		name: "下载",
		font_class: "xiazai",
		unicode: "e61d",
		unicode_decimal: 58909
	},
	{
		icon_id: "21534807",
		name: "系统设置2",
		font_class: "xitongshezhi2",
		unicode: "e61f",
		unicode_decimal: 58911
	},
	{
		icon_id: "21534808",
		name: "已下发",
		font_class: "yixiafa",
		unicode: "e621",
		unicode_decimal: 58913
	},
	{
		icon_id: "21534809",
		name: "发电厂",
		font_class: "fadianchang",
		unicode: "e623",
		unicode_decimal: 58915
	},
	{
		icon_id: "21534810",
		name: "系统监控",
		font_class: "xitongjiankong",
		unicode: "e626",
		unicode_decimal: 58918
	},
	{
		icon_id: "21534811",
		name: "锅炉",
		font_class: "guolu",
		unicode: "e627",
		unicode_decimal: 58919
	},
	{
		icon_id: "21534812",
		name: "电厂",
		font_class: "dianchang",
		unicode: "e62a",
		unicode_decimal: 58922
	},
	{
		icon_id: "21534813",
		name: "用户管理",
		font_class: "yonghuguanli",
		unicode: "e62b",
		unicode_decimal: 58923
	},
	{
		icon_id: "21534814",
		name: "停用",
		font_class: "tingyong",
		unicode: "e62c",
		unicode_decimal: 58924
	},
	{
		icon_id: "21534815",
		name: "接收",
		font_class: "jieshou",
		unicode: "e62d",
		unicode_decimal: 58925
	},
	{
		icon_id: "21534816",
		name: "机组",
		font_class: "jizu",
		unicode: "e62f",
		unicode_decimal: 58927
	},
	{
		icon_id: "21534817",
		name: "实时计算",
		font_class: "shishijisuan",
		unicode: "e630",
		unicode_decimal: 58928
	},
	{
		icon_id: "21534818",
		name: "监控",
		font_class: "jiankong1",
		unicode: "e631",
		unicode_decimal: 58929
	},
	{
		icon_id: "21534819",
		name: "开关1",
		font_class: "kaiguan1",
		unicode: "e632",
		unicode_decimal: 58930
	},
	{
		icon_id: "21534820",
		name: "查看",
		font_class: "chakan",
		unicode: "e633",
		unicode_decimal: 58931
	},
	{
		icon_id: "21534821",
		name: "开关",
		font_class: "kaiguan",
		unicode: "e634",
		unicode_decimal: 58932
	},
	{
		icon_id: "21534822",
		name: "分发",
		font_class: "fenfa",
		unicode: "e636",
		unicode_decimal: 58934
	},
	{
		icon_id: "21534823",
		name: "角色",
		font_class: "jiaose",
		unicode: "e637",
		unicode_decimal: 58935
	},
	{
		icon_id: "21534824",
		name: "采集1",
		font_class: "caiji1",
		unicode: "e638",
		unicode_decimal: 58936
	},
	{
		icon_id: "3515317",
		name: "更新",
		font_class: "gengxin",
		unicode: "e625",
		unicode_decimal: 58917
	},
	{
		icon_id: "4859088",
		name: "实时计算",
		font_class: "calculation",
		unicode: "e620",
		unicode_decimal: 58912
	},
	{
		icon_id: "6695124",
		name: "上传",
		font_class: "shangchuan",
		unicode: "e656",
		unicode_decimal: 58966
	},
	{
		icon_id: "6927865",
		name: "更新",
		font_class: "gengxin1",
		unicode: "e7db",
		unicode_decimal: 59355
	},
	{
		icon_id: "17536020",
		name: "文件夹",
		font_class: "wenjian1",
		unicode: "e670",
		unicode_decimal: 58992
	},
	{
		icon_id: "17764949",
		name: "文件夹",
		font_class: "wenjianjia1",
		unicode: "e7a6",
		unicode_decimal: 59302
	},
	{
		icon_id: "10666917",
		name: "成功",
		font_class: "chenggong",
		unicode: "e671",
		unicode_decimal: 58993
	},
	{
		icon_id: "1142736",
		name: "数据",
		font_class: "shuju",
		unicode: "e60e",
		unicode_decimal: 58894
	},
	{
		icon_id: "4739400",
		name: "运营",
		font_class: "yunying",
		unicode: "e644",
		unicode_decimal: 58948
	},
	{
		icon_id: "5255337",
		name: "用户名",
		font_class: "haikezhangguizhushou_yonghuming",
		unicode: "e622",
		unicode_decimal: 58914
	},
	{
		icon_id: "6537187",
		name: "复制",
		font_class: "fuzhi",
		unicode: "e66e",
		unicode_decimal: 58990
	},
	{
		icon_id: "7918919",
		name: "数据",
		font_class: "shuju1",
		unicode: "e601",
		unicode_decimal: 58881
	},
	{
		icon_id: "8444167",
		name: "更多",
		font_class: "down",
		unicode: "e602",
		unicode_decimal: 58882
	},
	{
		icon_id: "10918753",
		name: "展开",
		font_class: "zhankai1",
		unicode: "e618",
		unicode_decimal: 58904
	},
	{
		icon_id: "11108224",
		name: "主页",
		font_class: "zhuye",
		unicode: "e607",
		unicode_decimal: 58887
	},
	{
		icon_id: "11563365",
		name: "消息通知",
		font_class: "xiaoxitongzhi",
		unicode: "e65c",
		unicode_decimal: 58972
	},
	{
		icon_id: "12728450",
		name: "接入",
		font_class: "jieru",
		unicode: "e68a",
		unicode_decimal: 59018
	},
	{
		icon_id: "14698909",
		name: "报警",
		font_class: "bj",
		unicode: "e608",
		unicode_decimal: 58888
	},
	{
		icon_id: "14789476",
		name: "可视化",
		font_class: "keshihua",
		unicode: "e624",
		unicode_decimal: 58916
	},
	{
		icon_id: "15631425",
		name: "监控",
		font_class: "jiankong",
		unicode: "e629",
		unicode_decimal: 58921
	},
	{
		icon_id: "18916436",
		name: "报警",
		font_class: "baojing",
		unicode: "e6b8",
		unicode_decimal: 59064
	},
	{
		icon_id: "19410111",
		name: "密 码",
		font_class: "mima",
		unicode: "e611",
		unicode_decimal: 58897
	},
	{
		icon_id: "19739747",
		name: "密码",
		font_class: "suozi",
		unicode: "e66d",
		unicode_decimal: 58989
	},
	{
		icon_id: "20344795",
		name: "用户名",
		font_class: "yonghuming",
		unicode: "e628",
		unicode_decimal: 58920
	},
	{
		icon_id: "7639",
		name: "窗口放大",
		font_class: "chuangkoufangda",
		unicode: "e600",
		unicode_decimal: 58880
	},
	{
		icon_id: "1130659",
		name: "添加",
		font_class: "tianjia",
		unicode: "e635",
		unicode_decimal: 58933
	},
	{
		icon_id: "1488891",
		name: "查询",
		font_class: "chaxun",
		unicode: "e606",
		unicode_decimal: 58886
	},
	{
		icon_id: "1547848",
		name: "061操作_全屏放大3",
		font_class: "caozuo_quanpingfangda",
		unicode: "e694",
		unicode_decimal: 59028
	},
	{
		icon_id: "4942664",
		name: "收起",
		font_class: "shouqi",
		unicode: "e61e",
		unicode_decimal: 58910
	},
	{
		icon_id: "10031191",
		name: "缩小",
		font_class: "suoxiao",
		unicode: "e61b",
		unicode_decimal: 58907
	},
	{
		icon_id: "12729177",
		name: "展开",
		font_class: "zhankai",
		unicode: "e60d",
		unicode_decimal: 58893
	},
	{
		icon_id: "13905862",
		name: "文件",
		font_class: "wenjian",
		unicode: "e62e",
		unicode_decimal: 58926
	},
	{
		icon_id: "15192664",
		name: "刷新",
		font_class: "shuaxin",
		unicode: "e63d",
		unicode_decimal: 58941
	},
	{
		icon_id: "15765396",
		name: "数据看板",
		font_class: "shujukanban",
		unicode: "e6cf",
		unicode_decimal: 59087
	},
	{
		icon_id: "18863167",
		name: "放大",
		font_class: "fangda",
		unicode: "e642",
		unicode_decimal: 58946
	},
	{
		icon_id: "19671108",
		name: "文件夹",
		font_class: "wenjianjia",
		unicode: "e7a7",
		unicode_decimal: 59303
	}
];
var iconfontData = {
	id: id,
	name: name,
	font_family: font_family,
	css_prefix_text: css_prefix_text,
	description: description,
	glyphs: glyphs
};

/**
 * 月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符，
 * @param fmt 时间格式
 * @param second 秒
 */
Date.prototype.Format = function (fmt = "yyyy-MM-dd hh:mm:ss") {
    const o = {
        "M+": this.getMonth() + 1,
        "d+": this.getDate(),
        "h+": this.getHours(),
        "m+": this.getMinutes(),
        "s+": this.getSeconds(),
        "q+": Math.floor((this.getMonth() + 3) / 3),
        S: this.getMilliseconds() // 毫秒
    };
    if (/(y+)/.test(fmt)) {
        fmt = fmt.replace(RegExp.$1, `${this.getFullYear()}`.substr(4 - RegExp.$1.length));
    }
    for (const k in o) {
        if (new RegExp(`(${k})`).test(fmt)) {
            fmt = fmt.replace(RegExp.$1, RegExp.$1.length === 1 ? o[k] : `00${o[k]}`.substr(`${o[k]}`.length));
        }
    }
    return fmt;
};
/**
 *返回12小时制 下午 6:12
 *@param 秒
 */
Date.prototype.GetTimeByPeriod = function (second = 1) {
    return new Date().Format("HH:mm");
};
/**
 * 时间戳转化成时间格式
 * @param 时间戳
 */
Date.prototype.TimeFormat = function (timestamp) {
    return new Date(timestamp).Format("HH:mm");
};
// 时间戳转化成秒
Date.prototype.GetTime = function () {
    const time = Date.now() / 1000;
    const second = Math.floor(time);
    return second;
};
/**
 * 一定的秒数转化成时分秒格式
 * @param 秒
 */
Date.prototype.SecondsFormatHours = function (s) {
    s = Math.abs(Math.floor(s));
    const day = 0;
    let hour = Math.floor((s - day * 24 * 3600) / 3600);
    let minute = Math.floor((s - day * 24 * 3600 - hour * 3600) / 60);
    let second = s - day * 24 * 3600 - hour * 3600 - minute * 60;
    hour = hour > 9 ? hour : `0${hour}`;
    minute = minute > 9 ? minute : `0${minute}`;
    second = second > 9 ? second : `0${second}`;
    if (s > 0)
        return `${hour}:${minute}:${second}`;
    return `00:00:00`;
};
/**
 * 一定的秒数转化成分秒格式（数字）
 * @param 秒
 */
Date.prototype.SecondsFormatMinutes = function (s) {
    s = Math.abs(Math.floor(s));
    const hour = 0;
    let minute = Math.floor((s - hour * 3600) / 60);
    let second = s - hour * 3600 - minute * 60;
    minute = minute > 9 ? minute : `0${minute}`;
    second = second > 9 ? second : `0${second}`;
    if (s > 0) {
        return `${minute}:${second}`;
    }
    return `00:00`;
};
/**
 * 一定的秒数转化成月天时分秒格式（数字）
 * @param 秒
 */
Date.prototype.SecondsFormatDayHourMinuteNumber = function (s) {
    s = Math.abs(Math.floor(s));
    const month = Math.floor(s / (24 * 3600 * 30)); // Math.floor()向下取整
    let reduce = month * (24 * 3600 * 30);
    const day = Math.floor((s - reduce) / (24 * 3600)); // Math.floor()向下取整
    reduce += day * (24 * 3600);
    let hour = Math.floor((s - reduce) / 3600);
    reduce += hour * 3600;
    let minute = Math.floor((s - reduce) / 60);
    reduce += minute * 60;
    let second = s - reduce;
    hour = hour > 9 ? hour : `0${hour}`;
    minute = minute > 9 ? minute : `0${minute}`;
    second = second > 9 ? second : `0${second}`;
    let desc = "";
    desc += month > 0 ? `${month}:` : ``;
    desc += day > 0 ? `${day}:` : ``;
    desc += `${hour}:`;
    desc += `${minute}:`;
    desc += `${second}:`;
    if (s > 0)
        return desc;
    return `00:00:00`;
};
/**
 * 一定的秒数转化成月天时分秒格式（文字）
 * @param 秒
 */
Date.prototype.SecondsFormatDayHourMinuteText = function (s) {
    s = Math.abs(Math.floor(s));
    const month = Math.floor(s / (24 * 3600 * 30)); // Math.floor()向下取整
    let reduce = month * (24 * 3600 * 30);
    const day = Math.floor((s - reduce) / (24 * 3600)); // Math.floor()向下取整
    reduce += day * (24 * 3600);
    let hour = Math.floor((s - reduce) / 3600);
    reduce += hour * 3600;
    let minute = Math.floor((s - reduce) / 60);
    reduce += minute * 60;
    let second = s - reduce;
    hour = hour > 9 ? hour : `${hour}`;
    minute = minute > 9 ? minute : `${minute}`;
    second = second > 9 ? second : `${second}`;
    let desc = "";
    desc += month > 0 ? `${month}月` : ``;
    desc += day > 0 ? `${day}天` : ``;
    desc += `${hour}时`;
    desc += `${minute}分`;
    desc += `${second}秒`;
    if (s > 0)
        return desc;
    return ``;
};
/**
 * 一定的秒数秒转几天前几小时前几分前（文字）
 * @param 秒
 */
Date.prototype.SecondsFormatDayHourMinuteBrfore = function (s) {
    s = Math.abs(Math.floor(s));
    const day = Math.floor(s / (24 * 60 * 60));
    let reduce = day * 24 * 60 * 60;
    const hour = Math.floor((s - reduce) / (60 * 60));
    reduce += hour * 60 * 60;
    const minute = Math.floor((s - reduce) / 60);
    if (day > 0) {
        return `${day}天前`;
    }
    if (hour > 0) {
        return `${hour}小时前`;
    }
    if (minute > 0) {
        return `${minute}分钟前`;
    }
    return "刚刚";
};

/* eslint-disable no-extend-native */
if (catchUtil.getLocalItem("theme")) {
    const themeColor = catchUtil.getLocalItem("theme");
    commonUtils.toggleClass(document.body, `magus-ui-${themeColor}`);
}
else {
    commonUtils.toggleClass(document.body, "magus-ui-blue");
}
const exportApi = {
    apiConfig: apiConfig$1,
    catchUtil,
    funcUtil: funcUtils,
    commonUtils,
    logUtils: log,
    validateUtils: ptn,
    lang,
    iconfontData
};

export { exportApi as default };
